Added some organization
This commit is contained in:
parent
d59c956fc9
commit
8ea13a43b6
5 changed files with 34 additions and 22 deletions
|
|
@ -8,27 +8,6 @@
|
|||
#include <stdio.h>
|
||||
#include "tree.h"
|
||||
|
||||
char* gen_boop(){ // generates the "boop" string
|
||||
Node b;
|
||||
b.value = 'b';
|
||||
Node o;
|
||||
o.value = 'o';
|
||||
b.left = &o;
|
||||
Node p;
|
||||
p.value = 'p';
|
||||
o.left = &p;
|
||||
Node end;
|
||||
end.value = '\0';
|
||||
o.right = &end;
|
||||
char* res = (char*) malloc(sizeof(char)*5);
|
||||
res[0] = b.v();
|
||||
res[1] = b.l()->v();
|
||||
res[2] = b.l()->v();
|
||||
res[3] = b.l()->l()->v();
|
||||
res[4] = b.l()->r()->v();
|
||||
return res;
|
||||
}
|
||||
|
||||
char* this_is_useful_fr_dont_miss_it(){ // it's not, pure red herring
|
||||
char* useful = (char*) malloc(sizeof(char)*100);
|
||||
|
||||
|
|
@ -65,7 +44,7 @@ int _tmain(int argc, wchar_t* argv[])
|
|||
} else {
|
||||
printf("Et il est où l'argv???????");
|
||||
}
|
||||
// while(1);
|
||||
while(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@
|
|||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="tree.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Malware.cpp" />
|
||||
|
|
@ -140,6 +141,7 @@
|
|||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug + mauvais argument|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tree.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@
|
|||
<ClInclude Include="targetver.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="tree.h">
|
||||
<Filter>Fichiers d%27en-tête</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
|
@ -32,5 +35,8 @@
|
|||
<ClCompile Include="Malware.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tree.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1 +1,24 @@
|
|||
#include "stdafx.h" // IWYU pragma: keep
|
||||
#include "tree.h"
|
||||
|
||||
|
||||
char* gen_boop(){ // generates the "boop" string
|
||||
Node b;
|
||||
b.value = 'b';
|
||||
Node o;
|
||||
o.value = 'o';
|
||||
b.left = &o;
|
||||
Node p;
|
||||
p.value = 'p';
|
||||
o.left = &p;
|
||||
Node end;
|
||||
end.value = '\0';
|
||||
o.right = &end;
|
||||
char* res = (char*) malloc(sizeof(char)*5);
|
||||
res[0] = b.v();
|
||||
res[1] = b.l()->v();
|
||||
res[2] = b.l()->v();
|
||||
res[3] = b.l()->l()->v();
|
||||
res[4] = b.l()->r()->v();
|
||||
return res;
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
|
||||
class Node {
|
||||
public:
|
||||
|
|
@ -19,3 +20,4 @@ class Node {
|
|||
}
|
||||
};
|
||||
|
||||
char* gen_boop();
|
||||
Loading…
Add table
Add a link
Reference in a new issue