Skip to content

Commit 2c58751

Browse files
committed
Add How Compiler & Linker Works Examples
1 parent 7627fb3 commit 2c58751

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

HelloWorld/HelloWorld.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
</Link>
128128
</ItemDefinitionGroup>
129129
<ItemGroup>
130+
<ClCompile Include="Log.cpp" />
130131
<ClCompile Include="Main.cpp" />
131132
</ItemGroup>
132133
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

HelloWorld/HelloWorld.vcxproj.filters

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@
1818
<ClCompile Include="Main.cpp">
1919
<Filter>Fichiers sources</Filter>
2020
</ClCompile>
21+
<ClCompile Include="Log.cpp">
22+
<Filter>Fichiers sources</Filter>
23+
</ClCompile>
2124
</ItemGroup>
2225
</Project>

HelloWorld/Log.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <iostream>
2+
3+
void Logr(const char* message)
4+
{
5+
std::cout << message << std::endl;
6+
}

HelloWorld/Main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include <iostream>
22

3+
void Log(const char* message);
4+
35
int main()
46
{
5-
std::cout << "Hello World!" << std::endl;
7+
Log("Hello World!");
68
std::cin.get();
79
}

0 commit comments

Comments
 (0)