Move preprocessor TYPE define to header files
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include <iostream>
|
||||
|
||||
// Input the type we want to use within our vector here
|
||||
#define TYPE std::string
|
||||
|
||||
enum OPS {
|
||||
EXIT, PUSH, POP, TOP, PRINT, EMPTY, CONSTRUCT, COPY, ASSIGN, DESTRUCT
|
||||
|
||||
@@ -316,6 +316,4 @@ void Vector<T>::print(T *data) const
|
||||
}
|
||||
|
||||
// Instantiate relevant type templates for this class
|
||||
template class Vector<int>;
|
||||
template class Vector<float>;
|
||||
template class Vector<std::string>;
|
||||
template class Vector<TYPE>;
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
||||
#define TYPE std::string
|
||||
|
||||
template <typename T>
|
||||
class Vector {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user