Skip to content

Commit 1632e7e

Browse files
committed
Add How C++ Compiler Works
1 parent 2c58751 commit 1632e7e

File tree

5 files changed

+30
-1
lines changed

5 files changed

+30
-1
lines changed

HelloWorld/EndBrace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
}

HelloWorld/HelloWorld.vcxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
<SDLCheck>true</SDLCheck>
7777
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
7878
<ConformanceMode>true</ConformanceMode>
79+
<PreprocessToFile>false</PreprocessToFile>
80+
<AssemblerOutput>AssemblyCode</AssemblerOutput>
81+
<Optimization>MaxSpeed</Optimization>
82+
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
7983
</ClCompile>
8084
<Link>
8185
<SubSystem>Console</SubSystem>
@@ -90,6 +94,8 @@
9094
<SDLCheck>true</SDLCheck>
9195
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
9296
<ConformanceMode>true</ConformanceMode>
97+
<PreprocessToFile>false</PreprocessToFile>
98+
<AssemblerOutput>AssemblyCode</AssemblerOutput>
9399
</ClCompile>
94100
<Link>
95101
<SubSystem>Console</SubSystem>
@@ -129,6 +135,10 @@
129135
<ItemGroup>
130136
<ClCompile Include="Log.cpp" />
131137
<ClCompile Include="Main.cpp" />
138+
<ClCompile Include="Math.cpp" />
139+
</ItemGroup>
140+
<ItemGroup>
141+
<ClInclude Include="EndBrace.h" />
132142
</ItemGroup>
133143
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
134144
<ImportGroup Label="ExtensionTargets">

HelloWorld/HelloWorld.vcxproj.filters

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,13 @@
2121
<ClCompile Include="Log.cpp">
2222
<Filter>Fichiers sources</Filter>
2323
</ClCompile>
24+
<ClCompile Include="Math.cpp">
25+
<Filter>Fichiers sources</Filter>
26+
</ClCompile>
27+
</ItemGroup>
28+
<ItemGroup>
29+
<ClInclude Include="EndBrace.h">
30+
<Filter>Fichiers d%27en-tête</Filter>
31+
</ClInclude>
2432
</ItemGroup>
2533
</Project>

HelloWorld/Log.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <iostream>
22

3-
void Logr(const char* message)
3+
void Log(const char* message)
44
{
55
std::cout << message << std::endl;
66
}

HelloWorld/Math.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const char* Log(const char* message)
2+
{
3+
return message;
4+
}
5+
6+
int Multiply(int a, int b)
7+
{
8+
Log("Multiply")
9+
return a * b;
10+
}

0 commit comments

Comments
 (0)