I was messing around the other day with the sizeof() function(or is it a macro??..shrug), testing the sizes of various types on my machine when I came across something I did not expect. I executed the following code...
...and guess what...the answer was 1!!!Code:struct foo { }; cout << sizeof(foo) << endl;
Now this was not the answer I was expecting and upon further reflection I could think of no obvious reason for this response. Could anyone out there help me out with an explanation?
Thanks in advance
If it helps I was using .NET on a P4 machine running XP