Created
April 30, 2014 13:40
-
-
Save mortenpi/21f20279a554ed94d776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct type_t { | |
int i; | |
}; | |
void function() | |
{ | |
cout << sizeof(type_t::i) << endl; | |
} | |
struct A { | |
A(); | |
}; | |
A::A() | |
{ | |
cout << sizeof(type_t::i) << endl; | |
} | |
int main(int argc, char * argv[]) | |
{ | |
cout << sizeof(type_t::i) << endl; | |
function(); | |
A a; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment