1
0
LearningCPP/main.cpp
2022-11-25 12:24:19 +00:00

43 lines
606 B
C++

#include <iostream>
#include <random>
#include <chrono>
class A {
public:
A() {
std::cout << "Class A Created\n";
}
~A() {
std::cout << "Class A Destroyed\n";
}
};
class B {
public:
B() {
std::cout << "Class B Created\n";
}
~B() {
std::cout << "Class B Destroyed\n";
}
};
class C : public A {
B b{};
public:
C() {
std::cout << "Class C Created\n";
}
~C() {
std::cout << "Class C Destroyed\n";
}
};
int main()
{
A v{};
B w{};
C x{};
return 0;
}