Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3046

Why doesn't 'sizeof' work here?

$
0
0
Is 'sizeof' evaluated at compile time or run time? If it's at compile time, why doesn't this compile with VC8..?

Code:

__declspec(align(sizeof(int))) struct s {
        char a;
        int  b, c;
};


Viewing all articles
Browse latest Browse all 3046

Trending Articles