File tree Expand file tree Collapse file tree 6 files changed +29
-49
lines changed
enc_temp_folder/da161bb8f251f3ed50cc60fc5881cf20 Expand file tree Collapse file tree 6 files changed +29
-49
lines changed Original file line number Diff line number Diff line change 1919 </ProjectConfiguration >
2020 </ItemGroup >
2121 <ItemGroup >
22- <ClCompile Include =" src\Log.cpp" />
2322 <ClCompile Include =" src\Main.cpp" />
2423 </ItemGroup >
25- <ItemGroup >
26- <ClInclude Include =" src\Log.h" />
27- </ItemGroup >
2824 <PropertyGroup Label =" Globals" >
2925 <VCProjectVersion >16.0</VCProjectVersion >
3026 <Keyword >Win32Proj</Keyword >
Original file line number Diff line number Diff line change 1818 <ClCompile Include =" src\Main.cpp" >
1919 <Filter >Fichiers sources</Filter >
2020 </ClCompile >
21- <ClCompile Include =" src\Log.cpp" >
22- <Filter >Fichiers sources</Filter >
23- </ClCompile >
24- </ItemGroup >
25- <ItemGroup >
26- <ClInclude Include =" src\Log.h" >
27- <Filter >Fichiers d%27en-tête</Filter >
28- </ClInclude >
2921 </ItemGroup >
3022</Project >
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+
3+ #define LOG (x ) std::cout << x << std::endl
4+
5+ int main ()
6+ {
7+ int var = 8 ;
8+ int * ptr = &var;
9+ *ptr = 10 ;
10+ LOG (var);
11+
12+ char * buffer = new char [8 ]; // => 8 bytes of memory, return a pointer to the beginning of that block of memory
13+ memset (buffer, 0 , 8 );
14+
15+ char ** cptr = &buffer; // =>
16+
17+ delete[] buffer;
18+ std::cin.get (); // ==> Dead Code
19+ }
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#include < iostream>
2- #include " Log.h"
2+
3+ #define LOG (x ) std::cout << x << std::endl
34
45int main ()
56{
6- for (int i = 0 ; i < 5 ; i++)
7- {
8- if (i > 2 )
9- continue ;
10- Log (" Hello World!" );
11- std::cout << i << std::endl;
12- }
13-
14- Log (" ===========================" );
15-
16- for (int i = 0 ; i < 5 ; i++)
17- {
18- if ((i + 1 ) % 2 == 0 )
19- break ;
20- Log (" Hello World!" );
21- std::cout << i << std::endl;
22- }
7+ int var = 8 ;
8+ int * ptr = &var;
9+ *ptr = 10 ;
10+ LOG (var);
2311
24- Log (" ===========================" );
12+ char * buffer = new char [8 ]; // => 8 bytes of memory, return a pointer to the beginning of that block of memory
13+ memset (buffer, 0 , 8 );
2514
26- for (int i = 0 ; i < 5 ; i++)
27- {
28- if ((i + 1 ) % 2 == 0 )
29- return 0 ;
30- Log (" Hello World!" );
31- std::cout << i << std::endl;
32- }
15+ char ** cptr = &buffer; // => &buffer means get the memory address reference of the integer (pointer) that referenced a 8 bytes of char data
3316
34- return 0 ;
17+ delete[] buffer ;
3518 std::cin.get (); // ==> Dead Code
3619}
You can’t perform that action at this time.
0 commit comments