Files
UoL/CM2005 Object Oriented Programming/Topic 2/2.2.1/main.cpp
2021-05-19 23:16:26 -05:00

24 lines
724 B
C++

#include <iostream>
#include <string>
#include <vector>
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;
}