Hello everyone, I'm having a linking error with:
Getting:Code:#include "../../../std_lib_facilities.h" //------------------------------------------------------------------------------ class Token { public: char kind; // what kind of token double value; // for numbers: a value Token(char ch) // make a Token from a char :kind(ch), value(0) { } Token(char ch, double val) // make a Token from a char and a double :kind(ch), value(val) { } }; //------------------------------------------------------------------------------ Token get_token(); // PROBLEM MAY BE HERE //------------------------------------------------------------------------------ vector<Token> tok; // we'll put the tokens here //------------------------------------------------------------------------------ int main() { while (cin) { Token t = get_token(); tok.push_back(t); } // ... for (int i = 0; i<tok.size(); ++i) { if (tok[i].kind=='*') { // we found a multiply! double d = tok[i-1].value*tok[i+1].value; // now what? } } }
1>D:\Documentos\Projectos\Programming P & P w C++\Libro\6.3 Example Tokenizing\Debug\6.3 Example Tokenizing.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
Pleas advise



LinkBack URL
About LinkBacks


