diff options
Diffstat (limited to 'CST 126/Homework 1/main.cpp')
| -rw-r--r-- | CST 126/Homework 1/main.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/CST 126/Homework 1/main.cpp b/CST 126/Homework 1/main.cpp index b4c91fc..e223d37 100644 --- a/CST 126/Homework 1/main.cpp +++ b/CST 126/Homework 1/main.cpp @@ -58,13 +58,6 @@ union FloatIntUnion }; int main() { - FloatIntUnion floatIntUnion {}; - floatIntUnion.intFloat = 1.2345f; - - std::cout << "Float: " << floatIntUnion.intFloat << std::endl; - std::cout << "Binary representation: " << std::bitset<32>(static_cast<uint32_t>(floatIntUnion.intFloat)) << std::endl; - std::cout << "As Int: " << floatIntUnion.uInt << std::endl; - std::cout << "Binary representation: " << std::bitset<32>(floatIntUnion.uInt) << std::endl; - + return 0; } |