We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec553c7 commit 363883dCopy full SHA for 363883d
HelloWorld/src/Main.cpp
@@ -9,12 +9,12 @@ class Entity
9
{
10
X = 0.0f;
11
Y = 0.0f;
12
+ std::cout << "Created Entity!" << std::endl;
13
}
14
- Entity(float x, float y)
15
+ ~Entity()
16
- X = x;
17
- Y = y;
+ std::cout << "Destroyed Entity!" << std::endl;
18
19
20
void Print()
@@ -23,9 +23,15 @@ class Entity
23
24
};
25
26
-int main()
+void Function()
27
28
- Entity e(10.0f, 5.0f);
+ Entity e;
29
e.Print();
30
+}
31
+
32
+int main()
33
+{
34
+ Function();
35
36
std::cin.get();
37
0 commit comments