Search Results

Search: Posts Made By: xavipoes
Forum: Programming 08-09-2012
2,252
Posted By xavipoes
so it just avoids name clashes, associating it...
so it just avoids name clashes, associating it with a class, but it still is global.
yes right, i understand what you mean :), just one more thing,
if for instance there were two static members of...
Forum: Programming 08-09-2012
2,252
Posted By xavipoes
Ok, so I understand from your answer that only...
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.
:wall:
ty
Forum: Programming 08-09-2012
2,252
Posted By xavipoes
static use for class inside the same class c++
Hi,
I believe the next code is wrong:

class Egg {
Egg e;
int i;
Egg(int ii=0) : i(ii) {}
};
because you would end up with an endless definition (memory allocation) of Egg...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 01:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy