Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- union num {
- int i;
- short s;
- float f;
- double d;
- };
- enum tag {SHORT, INT, FLOAT, DOUBLE};
- struct vrnumber {
- num num;
- tag type;
- };
- vrnumber m;
- switch (m.type) {
- case SHORT: //an operation ..
- case INT: //same operation ...
- case FLOAT: //same operation ...
- case DOUBLE: //same operation ...
Add Comment
Please, Sign In to add comment