RSS Forums RSS
Please support our C++ advertiser: Programming Forums

Unresolved External Symbol Error

Join Date: Apr 2006
Location: Canada
Posts: 4,545
Reputation: John A is a name known to all John A is a name known to all John A is a name known to all John A is a name known to all John A is a name known to all John A is a name known to all 
Rep Power: 17
Solved Threads: 284
Moderator
Featured Blogger
John A's Avatar
John A John A is offline Offline
Vampirical Moderator

Re: Unresolved External Symbol Error

  #2  
Mar 15th, 2007
How in the world did you get it to compile? For one thing, you'll need to #include <iterator> if you intend on using ostream_iterator.

  1. int main()
  2. {
  3. vector<string> tokens;
  4.  
  5. char _string[256];
  6. char inputChar[256];
  7. string inputString;
  8. ifstream input;
  9.  
  10. cout << "Enter name of an existing file: ";
  11. cin.get( _string, 256 );
  12.  
  13. input.open( _string );
  14.  
  15. input.getline( inputChar, 256 );
  16. cout << inputChar << endl;
  17. inputString = inputChar;
  18. cout << inputString << endl << endl;
  19.  
  20. Tokenize( inputString, token ); // add an 's' to 'token'

  1. void Tokenize( const string& str, vector<string>& tokens, const string& delimiters = "|")
  2. {
  3. // Tokenize taken from [url]http://www.hispafuentes.com/[/url]
  4. // Skip delimiters at the beginning
  5. string::size_type lastPos = str.find_first_not_of( delimeters, 0 ); // you're spelling 'delimiters' wrong
tuxation.com - Linux articles, tutorials, and discussions
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:06 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC