Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- struct Pepe {
- int x;
- int y;
- int z;
- };
- struct Juan {
- Pepe& pp;
- int a;
- };
- typedef struct Pepe Pepe;
- typedef struct Juan Juan;
- int main (void) {
- Pepe joe;
- joe.x = 0;
- joe.y = 1;
- joe.z = 2;
- Juan johnny = {joe,18};
- cout << "Pepe: " << sizeof(joe) << endl << "Juan: " << sizeof(johnny) << endl << "Int: " << sizeof(int) << endl;
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment