So, I'm having an issue with linking. The answer is probably dead-weight easy, but I guess I'm bonked. I define a class for calculating things that takes a stringstream.
Relevant section of header file:
#include <sstream>
using namespace std;
template<class T>
class Finder {
public:
Finder(istringstream& input) {};
~Finder() {};
template<typename T> Finder(T& input) {};
template<typename T> ~Finder() {};
T check(istringstream&);
template<typename T> friend ostream& operator << (ostream&, Finder<t>&);
};
template<class T>
T Finder<T>::check(istringstream& input)
And then my driver file to the last call:
#include <sstream>
#include <string>
#include <iostream>
#include "Finder.h"
using namespace std;
int main(int argc, char** argv) {
Finder<int> thing;
string expression;
getline(cin, expression);
while(expression[0] != 'q') {
try {
int result = thing.check(istringstream(expression));
Errors are: 1>driver.obj : error LNK2019: unresolved external symbol "public: __thiscall Finder::Finder(void)" (??0?$Finder@H@@QAE@XZ) referenced in function _main
1>driver.obj : error LNK2019: unresolved external symbol "public: __thiscall Finder::~Finder(void)" (??1?$Finder@H@@QAE@XZ) referenced in function __catch$_main$0