-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
54 lines (43 loc) · 1.14 KB
/
Copy pathmain.cpp
File metadata and controls
54 lines (43 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//#include "Game.h"
#include "GameEngine.h"
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <iostream>
#include "Vec2.h"
#include <memory>
#include <vector>
//class Object
//{
// int a = 5;
//
//public:
// Object(int num) : a(num) {};
//
// int & getNumber()
// {
// return a;
// }
//};
//
int main()
{
/**
Object a = {6}; // constructing/creating object 'a'
Object a(6); // also constructing/creating object 'a'
Object * b = new Object(6); // storing new object to pointer
Object * c = &a; // pointing to address 'a'
Object d = a; // copying object 'a'
Object * e = b; // pointer to pointer
**/
/**
for the sake of cheap computation. because pointer is just an "aliases"
for A that u want to accessing. despite put 'all the thing' A had
inside a new bucket, u just pointing to the bucket that stored A
**/
//const int b = a.getNumber() + 1;
//Game game;
//game.run();
std::shared_ptr<GameEngine> game = std::make_shared<GameEngine>("assetsConfig.txt");
game->run();
return 0;
}