Skip to content

Commit 2596a86

Browse files
committed
Add How to Debug C++ in Visual Studio
1 parent 4f4ee5e commit 2596a86

File tree

6 files changed

+11
-31
lines changed

6 files changed

+11
-31
lines changed

HelloWorld/Common.h

Lines changed: 0 additions & 3 deletions
This file was deleted.

HelloWorld/HelloWorld.vcxproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<ClCompile Include="Main.cpp" />
2424
</ItemGroup>
2525
<ItemGroup>
26-
<ClInclude Include="Common.h" />
2726
<ClInclude Include="Log.h" />
2827
</ItemGroup>
2928
<PropertyGroup Label="Globals">

HelloWorld/HelloWorld.vcxproj.filters

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,5 @@
2626
<ClInclude Include="Log.h">
2727
<Filter>Fichiers d%27en-tête</Filter>
2828
</ClInclude>
29-
<ClInclude Include="Common.h">
30-
<Filter>Fichiers d%27en-tête</Filter>
31-
</ClInclude>
3229
</ItemGroup>
3330
</Project>

HelloWorld/Log.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
#include <iostream>
22
#include "Log.h"
3-
#include "Common.h"
4-
5-
#ifndef _LOG_H
6-
#define _LOG_H
7-
8-
void Log(const char* message);
9-
void InitLog();
10-
11-
struct Player {};
12-
13-
#endif
14-
15-
void InitLog()
16-
{
17-
Log("Initialize Log");
18-
}
193

204
void Log(const char* message)
215
{

HelloWorld/Log.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
#ifndef _LOG_H
2-
#define _LOG_H
1+
#pragma once
32

43
void Log(const char* message);
5-
void InitLog();
6-
7-
struct Player {};
8-
9-
#endif

HelloWorld/Main.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,16 @@
33

44
int main()
55
{
6-
InitLog();
6+
int a = 8;
7+
a++;
8+
const char* string = "Hello";
9+
10+
for (int i = 0; i < 5; i++)
11+
{
12+
const char c = string[i];
13+
std::cout << c << std::endl;
14+
}
15+
716
Log("Hello World!");
817
std::cin.get();
918
}

0 commit comments

Comments
 (0)