diff --git a/librerie/exercise4/build.sh b/librerie/exercise4/build.sh index bedbbbc..1f825de 100755 --- a/librerie/exercise4/build.sh +++ b/librerie/exercise4/build.sh @@ -1,7 +1,7 @@ #! /bin/bash -g++-10 -O3 -o main \ +g++-10 -o main \ zlasdtest/exercise1/simpletest.cpp zlasdtest/exercise1/fulltest.cpp \ zlasdtest/exercise2/simpletest.cpp zlasdtest/exercise2/fulltest.cpp \ zlasdtest/exercise3/simpletest.cpp zlasdtest/exercise3/fulltest.cpp \ diff --git a/librerie/exercise4/zmytest/test.cpp b/librerie/exercise4/zmytest/test.cpp index f45649d..ed93d6e 100755 --- a/librerie/exercise4/zmytest/test.cpp +++ b/librerie/exercise4/zmytest/test.cpp @@ -30,6 +30,7 @@ void menu(){ break; } } + DataType ChooseDataType(){ unsigned short int choice; do{ @@ -69,8 +70,8 @@ void UseChosenType(DataType chosenDataType){ /* ----- integer functions ----- */ -template -void IntegerFunctions(T& bst){ +template +void IntegerFunctions(BST& bst){ unsigned short int choice; do{ std::cout< -void ProductsElementsLessThan(T& tree){ +template +void ProductsElementsLessThan(BST& tree){ int n, acc=1; void (*func)(const int&, const void*, void*) = AccumulateProduct; @@ -185,8 +186,8 @@ void AccumulateProduct(const int& data, const void* par, void* acc){ } /* ----- float functions ----- */ -template -void FloatFunctions(T& bst){ +template +void FloatFunctions(BST& bst){ unsigned short int choice; do{ std::cout< -void SumElementsGreaterThan(T& tree){ +template +void SumElementsGreaterThan(BST& tree){ float n, acc = 0; void (*func)(const float&, const void*, void*) = AccumulateSum; @@ -301,8 +302,8 @@ void AccumulateSum(const float& data, const void* par, void* acc){ /* ----- string functions ----- */ -template -void StringFunctions(T& bst){ +template +void StringFunctions(BST& bst){ unsigned short int choice; do{ std::cout< -void ConcatLessThan(T& tree){ +template +void ConcatLessThan(BST& tree){ int n; string concatenated = ""; void (*func)(const string&, const void*, void*) = ConcatAString; @@ -417,9 +418,9 @@ void ConcatAString(const string& data, const void* par, void* acc){ } /* ----- shared functions ----- */ -template