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 2d2a357 commit be7701aCopy full SHA for be7701a
HelloWorld/src/Main.cpp
@@ -1,11 +1,27 @@
1
#include <iostream>
2
3
-extern int s_Variable;
+struct Entity
4
+{
5
+ static int x, y;
6
+
7
+ static void Print()
8
+ {
9
+ std::cout << x << ", " << y << std::endl;
10
+ }
11
+};
12
-void Function();
13
+int Entity::x;
14
+int Entity::y;
15
16
int main()
17
{
- std::cout << s_Variable << std::endl;
18
+ Entity::x = 2;
19
+ Entity::y = 3;
20
21
+ Entity::x = 5;
22
+ Entity::y = 8;
23
24
+ Entity::Print();
25
26
std::cin.get();
27
}
0 commit comments