add forward declaration examples
add classes
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace MyNamespace
|
||||
{
|
||||
class Entity
|
||||
{
|
||||
public:
|
||||
Entity(); // constructor declaration
|
||||
Entity(std::string n);
|
||||
|
||||
virtual std::string ToString() { return "Entity"; } // defined
|
||||
void setName(std::string n) { _name = n; } // defined
|
||||
std::string getName() { return _name; }
|
||||
|
||||
protected:
|
||||
std::string _name = "";
|
||||
}; // IMPORTANT: semicolon at the end
|
||||
}
|
||||
Reference in New Issue
Block a user