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 2596a86 commit 2e40305Copy full SHA for 2e40305
HelloWorld/Main.cpp
@@ -3,16 +3,25 @@
3
4
int main()
5
{
6
- int a = 8;
7
- a++;
8
- const char* string = "Hello";
+ int x = 5;
9
10
- for (int i = 0; i < 5; i++)
11
- {
12
- const char c = string[i];
13
- std::cout << c << std::endl;
14
- }
+ if (x == 5)
+ Log("Hello World!");
+
+ if (x)
+ const char* ptr = "Hello";
15
+ if (ptr)
16
17
18
+ ptr = nullptr;
19
20
+ Log(ptr);
21
+ else if (ptr == "Hello")
22
+ Log("Ptr is Hello!");
23
+ else
24
+ Log("Ptr is null!");
25
- Log("Hello World!");
26
std::cin.get();
27
}
0 commit comments