add forward declaration examples
add classes
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#include <iostream>
|
||||
#include "Entity.h"
|
||||
#include "Monster.h"
|
||||
#include "Vector3.h"
|
||||
|
||||
using namespace MyNamespace;
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
Entity entity; // this is an instance
|
||||
cout << entity.ToString() << endl;
|
||||
|
||||
Monster monster;
|
||||
cout << monster.ToString() << endl;
|
||||
|
||||
Vector3 position(1.0f, 0.0f, 2.0f);
|
||||
Vector3 position2 = Vector3();
|
||||
Vector3 position3{}; // list-initializer
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user