add example for "default constructor, copy constructor, destructor, if you need one you'll need all"

add smart pointer
add pointer pointer
This commit is contained in:
2025-03-27 21:37:30 +01:00
parent 4b6ac6a484
commit a557775853
11 changed files with 163 additions and 33 deletions
+4 -1
View File
@@ -3,16 +3,19 @@
Entity::Entity()
{
std::cout << "Create Entity" << std::endl;
}
Entity::Entity(std::string name) : name(name)
{
std::cout << "Create Entity with name" << std::endl;
//this->name = name;
}
Entity::~Entity()
{
std::cout << "Destroy Entity" << std::endl;
}
std::string Entity::ToString()