From b74402bae870473dd5820879260c6fa17b68e212 Mon Sep 17 00:00:00 2001 From: tmalkoc Date: Mon, 12 Nov 2018 17:15:58 +0100 Subject: [PATCH 1/2] Tvrtko Malkoc - day1 - exercise 01 --- exercise/01/app/app.cpp | Bin 0 -> 3958 bytes exercise/01/app/app.vcxproj | 188 ++++++++++++++++++++++++++++ exercise/01/app/app.vcxproj.filters | 30 +++++ exercise/01/app/pch.cpp | Bin 0 -> 430 bytes exercise/01/app/pch.h | Bin 0 -> 1262 bytes 5 files changed, 218 insertions(+) create mode 100644 exercise/01/app/app.cpp create mode 100644 exercise/01/app/app.vcxproj create mode 100644 exercise/01/app/app.vcxproj.filters create mode 100644 exercise/01/app/pch.cpp create mode 100644 exercise/01/app/pch.h diff --git a/exercise/01/app/app.cpp b/exercise/01/app/app.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2440a2faa185f5c34b17552009de16d95ae4ef18 GIT binary patch literal 3958 zcmdUyYi|=*5QgV-CH}+Ke86doP14d25Gu7HMwZeBh4iL^R_^X57@0Wog^McwI^}uK z`1ts;F$OB6YGv>4IWuS8xzGOlwry?8tY?>8Ei1x3vpcMv+EeS>n5Q%D1FLu{Y-krY zfxgdOdlRU%bHkp`R&NB3DfcZhfi?yBTKpP;Zk=X7ARL21rwZ8*8&7O;S{oUC zu(mmW%3W{8Mkx(;#aBW*u)Po9+_#rOuM*q6#0JtOA#{HTea5bI?V(2=-tXHHS8n(1 zPy5Aww4beO2fQC~|H)2RIbr87djju0en;4-WskW^dyVB~3+a{5w3XjR?6hWDH0*A$ z)FOt6AVaE4@7S+MKOmaAcFa?55A2Y)+#CfWLI+j3I7=qWZ#mUxPvt$ zOV-}!QiN%*$8XV6qFmRZiIzL?+{1t3jAwlK2`)RKszRO&7IYHoMZfd{>LII}eVend z2#pajM7I(zDcYm|n{(f8j;v^7Vd)1?HSNnS<+}&OnY^&-i3&s`D559aHv=SO*kc&H zG~g}`Qk`1XKU;}y)xG4I7{i!@~m{o1bjB+qt2OjT=DWV`rMyr>#0T0X57oXv2o*1-Qy4S2uj_dde&SI5Y9o?fnN zw`LVARWEr@Kc6&DLUqdM$cxjUa_)eP9EINVHE$ie&Hs=U)t8F?Go`0yA*vrisaZsQ z_;+fEGCB6;MC)^;c%H+50e?b~sOpexD?6Q1FDuDA1?44GRkO6~msGnRahfKiSi96$ULi?+Pkxd07UxHCY6?(KEb)kDc1?PUfi&lj zS7h(i%07k1C;9DUdI!6JOWy?%$rwE9iA6x*G>QZ1wQPZJYf&5r?KOw{3@m&4tehlN z;cP{azGE~Ec(g>W_?@AdL0>bnnqo$M&~3A7k?(4;9KtE&;@8Zie66?t3wA3!qpzUI zvnu0uknw=?q9)#{pTXl6)EwzuJ7co;^Sa2aKp%Mu&X=FGs=3IiWal!h#BaN?sgpbQ zO>*RG*DOZvszi@1|GrzMtdkmX#%}C&A?mms0pACUbkRaw{@tnm + + + + 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 0000000000000000000000000000000000000000..a38f8a37da858b0e7a4a577210e923c883ac97f3 GIT binary patch literal 430 zcma)(OAdlS5JYQj;vFWsRoUwaJO;ubLXfO} ziM!*RK?b#&)PqF4LX~Q_GVq=g$>^{f<-{7@$r|ykmqm|MwtC_%l{t|TJS9Jpalvn} ztpC7C!Dg_+`-h+El+KlNtsDc|GOvyF+iK(A-j!r1ot!0T2mdlziM{46Ghg8k=#H+V zM?tLvNCnoo3Y&aHb%nm~4lL&e!^r!5 zY>)Yt7?F2lcmBR1+QK#-XGNr7XZ8fr!cn3lZ5^Y)vUSfD^AwDN*h^Lw&)lPx++47# zd)SAA*b{C}iSS;`84M~$v>AMrgP7FJ8+gu~LAukhS6*EOJ`b`OdG>3c0~t!sZmv>H zn*HLA@+(*ivq2}#QbRtnCS6sZB|bGHY13EaXpqYpyv1DpS76m1eTdT|r_t-78YQ1T z#<62u5HD*r_L~oQCI!E8@(t$Ve*GNp63pmTN&3$4QJrKBuD-fJIu~wfYrcy;aeoU( z{gpDyo!duDy%mVwzd3}ObITpQ?&R3*fD>2bk}TRUp!6E5gQ6*el=X_*#+Q5I8?Z>{ zRy|dAN-mZA&0pz!j#b}5FeyBGiKSg%o7_9|!S#V|#ttsxpDyDUbdaS$838t Date: Tue, 13 Nov 2018 11:14:12 +0100 Subject: [PATCH 2/2] Tvrtko Malkoc - day1 - exercise 02 --- exercise/02/code.cpp | 13 +++++++++++++ exercise/02/code.h | 4 ++++ exercise/02/test1.cpp | 6 +++--- 3 files changed, 20 insertions(+), 3 deletions(-) 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]);