mirror of
https://bitbucket.org/Mattrixwv/my-classes.git
synced 2025-12-06 18:23:57 -05:00
Fixed sort problem and added declarations to the front of the file
This commit is contained in:
@@ -14,6 +14,18 @@
|
||||
namespace mee{
|
||||
|
||||
|
||||
//A list of functions in the file
|
||||
//Also works as a declaration
|
||||
template<class T>
|
||||
std::vector<T> getPrimes(T goalNumber);
|
||||
template<class T>
|
||||
std::vector<T> getDivisors(T num);
|
||||
template <class T>
|
||||
T getSum(std::vector<T> numbers);
|
||||
template<class T>
|
||||
bool isFound(T num, std::vector<T> list);
|
||||
|
||||
|
||||
template<class T>
|
||||
std::vector<T> getPrimes(T goalNumber){
|
||||
std::vector<T> primes;
|
||||
@@ -48,7 +60,7 @@ std::vector<T> getPrimes(T goalNumber){
|
||||
foundFactor = false;
|
||||
}
|
||||
}
|
||||
std::sort(primes.front(), primes.end());
|
||||
std::sort(primes.begin(), primes.end());
|
||||
return primes;
|
||||
}
|
||||
|
||||
@@ -68,7 +80,7 @@ std::vector<T> getDivisors(T num){
|
||||
}
|
||||
}
|
||||
}
|
||||
std::sort(divisors.front(), divisors.end());
|
||||
std::sort(divisors.begin(), divisors.end());
|
||||
return divisors;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user