If i were to define an abstract data type with static variables. Is it possible to make more than one instance of that adt.?
Printable View
If i were to define an abstract data type with static variables. Is it possible to make more than one instance of that adt.?
Is this a C or C++ question?
its a c question
If you mean like this, then the answer is no
C has no support for such an ideaCode:struct wibble {
int foo;
static int bar; // only one of these, no matter how much wibbling you do
};
But there are ways around such problems
cool, i know it was a silly question but i just wanted to check :)