Added: C++ projects
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// Created by David Hackbarth on 21.09.26.
|
||||
//
|
||||
|
||||
#include "Entity.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
Entity::Entity() : _name("") //defined
|
||||
{
|
||||
cout << "Entity constructor called" << endl;
|
||||
}
|
||||
|
||||
Entity::Entity(string name) : _name(name)
|
||||
{
|
||||
// _name = name;
|
||||
|
||||
cout << "Entity constructor with name called" << endl;
|
||||
}
|
||||
|
||||
Entity::~Entity()
|
||||
{
|
||||
cout << "Entity destructor called" << endl;
|
||||
}
|
||||
|
||||
string Entity::toString()
|
||||
{
|
||||
return "Entity: " + _name;
|
||||
}
|
||||
|
||||
void Entity::setName(string name)
|
||||
{
|
||||
_name = name;
|
||||
}
|
||||
Reference in New Issue
Block a user