diff --git a/exercise/01/app/app.cpp b/exercise/01/app/app.cpp new file mode 100644 index 0000000..2440a2f Binary files /dev/null and b/exercise/01/app/app.cpp differ diff --git a/exercise/01/app/app.vcxproj b/exercise/01/app/app.vcxproj new file mode 100644 index 0000000..32233fc --- /dev/null +++ b/exercise/01/app/app.vcxproj @@ -0,0 +1,188 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {6BA7E83B-616F-49CC-B977-567C4FD84AA7} + Win32Proj + app + 10.0.17134.0 + + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + false + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + false + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Use + Level3 + Disabled + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + ..\lib;%(AdditionalIncludeDirectories) + + + Console + true + ..\dll2\x64\Debug;..\lib\x64\Debug;%(AdditionalLibraryDirectories) + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + + + + + Use + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + %(AdditionalIncludeDirectories) + + + Console + true + ..\dll2\Win32\Debug;..\lib\Win32\Debug;%(AdditionalLibraryDirectories) + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + + + + + Use + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + ..\lib;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ..\dll2\Win32\Release;..\lib\Win32\Release;%(AdditionalLibraryDirectories) + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + ..\lib;%(AdditionalIncludeDirectories) + + + Console + true + true + true + ..\dll2\x64\Release;..\lib\x64\Release;%(AdditionalLibraryDirectories) + static_library.lib;dynamic_library_with_implib.lib;%(AdditionalDependencies) + + + + + + + + + Create + Create + Create + Create + + + + + + \ No newline at end of file diff --git a/exercise/01/app/app.vcxproj.filters b/exercise/01/app/app.vcxproj.filters new file mode 100644 index 0000000..cffaa85 --- /dev/null +++ b/exercise/01/app/app.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/exercise/01/app/pch.cpp b/exercise/01/app/pch.cpp new file mode 100644 index 0000000..a38f8a3 Binary files /dev/null and b/exercise/01/app/pch.cpp differ diff --git a/exercise/01/app/pch.h b/exercise/01/app/pch.h new file mode 100644 index 0000000..d87432d Binary files /dev/null and b/exercise/01/app/pch.h differ diff --git a/exercise/02/code.cpp b/exercise/02/code.cpp index 85e778c..74e2c0e 100644 --- a/exercise/02/code.cpp +++ b/exercise/02/code.cpp @@ -1,2 +1,15 @@ #include "stdafx.h" #include "code.h" + +void f1(int& a, int& b) +{ + a += b; + b = a - b; + a = a - b; +} + +void f2(int *begin, const int *const end) +{ + for (; begin < end; begin++) + (*begin)++; +} diff --git a/exercise/02/code.h b/exercise/02/code.h index e69de29..2510e85 100644 --- a/exercise/02/code.h +++ b/exercise/02/code.h @@ -0,0 +1,4 @@ +#pragma once + +void f1(int&, int&); +void f2(int *, const int *const); \ No newline at end of file diff --git a/exercise/02/test1.cpp b/exercise/02/test1.cpp index 33dfab7..29b52ae 100644 --- a/exercise/02/test1.cpp +++ b/exercise/02/test1.cpp @@ -14,14 +14,14 @@ namespace simple_test TEST_METHOD(f1_changes_values) { int a=1, b=2; - //f1(a, b); + f1(a, b); Assert::AreEqual(2, a); Assert::AreEqual(1, b); } TEST_METHOD(f2_increases_all_values_by_one) { int arr[] = { 1, 2, 3 }; - //f2(arr, arr+3); + f2(arr, arr+3); Assert::AreEqual(2, arr[0]); Assert::AreEqual(3, arr[1]); Assert::AreEqual(4, arr[2]); @@ -29,7 +29,7 @@ namespace simple_test TEST_METHOD(f2_works_for_different_number_of_values) { int arr[] = { 2, 4, 6, 8, 10 }; - //f2(arr, arr+5); + f2(arr, arr+5); Assert::AreEqual(3, arr[0]); Assert::AreEqual(5, arr[1]); Assert::AreEqual(7, arr[2]);