#include #include #include "templates.h" #include "structs_enums_unions.h" #include "inlines.h" int main() { int *pI = new int(0); long *pL = new long(0); safeDelete(pI); safeDelete(pL); Node n1(1); Node n2(2); Node n3(3); n1.next = &n2; n2.next = &n3; // random std::default_random_engine generator; std::uniform_int_distribution distribution(1, 100); std::cout << distribution(generator) << std::endl; for (int i = 0; i < 10; i++) { std::cout << distribution(generator) << std::endl; } // enums Weekdays weekday = Weekdays::Monday; std::cout << "Today is " << weekday << std::endl; // unions ScreenSize screen_size; screen_size.u.width = 1920; screen_size.u.height = 1080; int size = sizeof(screen_size); // structs Vector3 v1 = {1.0f, 2.0f, 3.0f}; Vector3 v2 = {4.0f, 5.0f, 6.0f}; Vector3 v3 = {7.0f, 8.0f, 9.0f}; bool isEqual = v1 == v2; std::cout << "v1 == v2: " << isEqual << std::endl; std::cout << "v1: " << v1 << std::endl; // inline Value v(42); std::cout << "Value: " << v.getValue() << std::endl; return 0; }