Re: [algogeeks] plzz explain

2011-07-27 Thread Prashant Gupta
Static variable needs to be defined outside cpp class. inside the class we dint difine it but just declared it. So size to be considered is just 1 int variable. On Wed, Jul 27, 2011 at 2:29 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote:

Re: [algogeeks] plzz explain

2011-07-26 Thread Piyush Sinha
http://www.cprogramming.com/tutorial/size_of_class_object.html On 7/27/11, TUSHAR tusharkanta.r...@gmail.com wrote: 1. #includeiostream using namespace std; class abc { int x; static int y; }; main() { abc a; coutsizeof(a);