08-09-2012
Ok, so I understand from your answer that only one instance of Egg object is allocated in the program static memory area, even when an egg class object is a member of that class.
ty
10 More Discussions You Might Find Interesting
1. Programming
I'm trying to put together a summer class for me and a few of my classmates. The class will be given a credit this fall. The Topic will be Unix Network Programming for Unix. We will have some IBM R6000's to work on, with AIX 4.2 and/or yellow dog (as yet to be determined if/how much a role each... (1 Reply)
Discussion started by: thmnetwork
1 Replies
2. UNIX Desktop Questions & Answers
This is a great sight! Excellent site, added to favorites!! I am also webmaster and I like this one!Thank you! (0 Replies)
Discussion started by: Leksej
0 Replies
3. UNIX Desktop Questions & Answers
Hi..!!!You have a very nice web-site! Good work!I am also webmaster and I like this one!Thank you! (1 Reply)
Discussion started by: Hardan
1 Replies
4. UNIX for Dummies Questions & Answers
im just trying to have some fun and kill some time writing a c++ program that has a person type in a car make and model then gives them a year and a price. or something like that. i always have problems getting it goin but once the ball is rolling im usually pretty good. anyone wanna help me out? ... (1 Reply)
Discussion started by: rickym2626
1 Replies
5. Programming
Hi, i have a question about C++. Is it possible to declare a class with a member ot the same class? For example, a linked list or i want to convert this C code to C++ class (Elemento)
typedef struct elemento
{
char name;
char value;
List<struct elemento> ltElementos;
... (7 Replies)
Discussion started by: pogdorica
7 Replies
6. Shell Programming and Scripting
cat a.pl
#!/usr/bin/perl
package Myperlclass;
sub mysub{
my $class;
$class=shift;
my $self{};
bless $self,$class;
return $self;
}
sub add{
my $a,$b,$res;
$a=$_;
$b=$_;
$res=$a+$b;
print "res: $res\n";
} (0 Replies)
Discussion started by: cola
0 Replies
7. UNIX for Advanced & Expert Users
Hi all!
I am trying to register a device in an existing device class, but I am
having trouble getting the pointer to an existing class.
I can create a class in a module, get the pointer to it and then use
it to register the device with:
*cl = class_create(THIS_MODULE, className);... (0 Replies)
Discussion started by: hdaniel@ualg.pt
0 Replies
8. Programming
I have the two class definition as follows.
class A { public: int a; };
class B : virtual public A{ };
The size of class A is shown as 4, and size of class B is shown as 16. Why is this effect ?. (2 Replies)
Discussion started by: techmonk
2 Replies
9. Programming
Hello All,
I am a learner in C++. I was testing my inheritance knowledge with following piece of code.
#include <iostream>
using namespace std;
class base
{
public :
void display()
{
cout << "In base display()" << endl;
}
void display(int k)
{... (2 Replies)
Discussion started by: anand.shah
2 Replies
10. Programming
const int VALUES = {7,4,2,1,0}; //or int VALUES = {7,4,2,1,0};this statement inside a class definition gives error. Why? (3 Replies)
Discussion started by: milhan
3 Replies
is(n) [incr Tcl] is(n)
__________________________________________________________________________________________________________________________________________________
NAME
is - test argument to see if it is a class or an object
SYNOPSIS
itcl::is option ?arg arg ...?
_________________________________________________________________
DESCRIPTION
The is command is used to check if the argument given is a class or an object; depending on the option given. If the argument if a class or
object, then 1 is returned. Otherwise, 0 is returned. The is command also recognizes the commands wrapped in the itcl code command.
The option argument determines what action is carried out by the command. The legal options (which may be abbreviated) are:
is class command
Returns 1 if command is a class, and returns 0 otherwise.
The fully qualified name of the class needs to be given as the command argument. So, if a class resides in a namespace, then the
namespace needs to be specified as well. So, if a class C resides in a namespace N, then the command should be called like:
is N::C
or
is ::N::C
is object ?-class className? command
Returns 1 if command is an object, and returns 0 otherwise.
If the optional "-class" parameter is specified, then the command will be checked within the context of the class given. Note that
className has to exist. If not, then an error will be given. So, if className is uncertain to be a class, then the programmer will
need to check it's existance beforehand, or wrap it in a catch statement.
So, if c is an object in the class C, in namespace N then these are the possibilities (all return 1):
set obj [N::C c]
itcl::is object N::c
itcl::is object c
itcl::is object $obj
itcl::is object [itcl::code c]
KEYWORDS
class, object
itcl 3.3 is(n)