Dear all,
Here is my code: It does not work and gives me an error
line 20: error: new types may not be defined in a return type
compilation terminated due to -Wfatal-errors.
The code is below:
#include <iostream>
#include <stdio.h>
struct s{
char ch;
int i;
}
union u{
char ch;
int i;
}
class c{
char ch;
int i;
}
main(){//<- Where the error points))
cout << sizeof(s);
cout << sizeof(u);
cout << sizeof(c);
}
I am using DEV C++ as a compiler
Thank you very much Disch!
Which IDE do you recommend?
rjain02, DEV C++ isn't a compiler, its an IDE. I'd suggest anything from NetBeans to NotePad++.
Last edited on