aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 1/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CST 126/Homework 1/main.cpp')
-rw-r--r--CST 126/Homework 1/main.cpp27
1 files changed, 1 insertions, 26 deletions
diff --git a/CST 126/Homework 1/main.cpp b/CST 126/Homework 1/main.cpp
index f61633a..e223d37 100644
--- a/CST 126/Homework 1/main.cpp
+++ b/CST 126/Homework 1/main.cpp
@@ -58,31 +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;*/
- int input;
- cout << "How big you want your array? ";
- cin >> input;
-
-
- int* intArray = nullptr;
-
- try {
- intArray = new int[input] {};
- }
- catch (const std::bad_alloc& ex) {
- delete[] intArray;
- intArray = nullptr;
- std::cerr << "Exception allocating memor for int array:" << ex.what();
- }
-
- delete[] intArray;
-
+
return 0;
}