- 1
Please I wrote this on my compiler and got a lot of error messages please explain
1. union numericUnion 2. { 3. int intValue; 4. long longValue; 5. double doubleValue; 6. }; 7. numericUnion myUnion; 8. myUnion.intValue = 3; 9. cout << myUnion.intValue << endl; 10. myUnion.doubleValue = 4.5; 11. cout << myUnion.doubleValue << endl; 12. cout << myUnion.intValue; 13. cout << endl;
1 Respuesta
+ 3
Man the whole code is wrong. Where's your main function?