aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 1/main.cpp
diff options
context:
space:
mode:
authorArthur Spears <[email protected]>2024-04-20 11:05:46 -0700
committerArthur Spears <[email protected]>2024-04-20 11:05:46 -0700
commit618d163b5539b6a5e2f6c9ffb3f256d4f09a1e3b (patch)
treecebf8ee2c18c8e0aa4cf5fc4630a8005164b068d /CST 126/Homework 1/main.cpp
parentAdded second unit tests project as example. (diff)
downloadhomework-1-arthurtspears-feature/unit_tests.tar.xz
homework-1-arthurtspears-feature/unit_tests.zip
Bring up to date for mergefeature/unit_tests
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;
}