diff --git a/CM2005 Object Oriented Programming/Topic 2/2.2.1/a.exe b/CM2005 Object Oriented Programming/Topic 2/2.2.1/a.exe new file mode 100644 index 0000000..6340741 Binary files /dev/null and b/CM2005 Object Oriented Programming/Topic 2/2.2.1/a.exe differ diff --git a/CM2005 Object Oriented Programming/Topic 2/2.2.1/main.cpp b/CM2005 Object Oriented Programming/Topic 2/2.2.1/main.cpp new file mode 100644 index 0000000..c7bf67d --- /dev/null +++ b/CM2005 Object Oriented Programming/Topic 2/2.2.1/main.cpp @@ -0,0 +1,24 @@ +#include +#include +#include + +enum class Colours{blue, green, red}; + +int main() +{ + //unsigned short usi=65536; + signed long sli=65536; + + std::cout << " size of unsigned short: " << sizeof(unsigned short) << std::endl; + std::cout << " size of unsigned short: " << sizeof(unsigned long) << std::endl; + std::cout << " size of unsigned short: " << sizeof(int) << std::endl; + //std::cout << "i contains: " << usi << std::endl; + std::cout << "i contains: " << sli << std::endl; + + std::cout << "--enum--" << std::endl; + + std::string s = {"hello"}; + Colours col = Colours::red; + //std::cout << "color is: " << col.toString() << std::endl; this doesn't work + return 0; +} \ No newline at end of file