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.
int main()
{
vector<string> tokens;
char _string[256];
char inputChar[256];
string inputString;
ifstream input;
cout << "Enter name of an existing file: ";
cin.get( _string, 256 );
input.open( _string );
input.getline( inputChar, 256 );
cout << inputChar << endl;
inputString = inputChar;
cout << inputString << endl << endl;
Tokenize( inputString, token ); // add an 's' to 'token'
void Tokenize( const string& str, vector<string>& tokens, const string& delimiters = "|")
{
// Tokenize taken from [url]http://www.hispafuentes.com/[/url]
// Skip delimiters at the beginning
string::size_type lastPos = str.find_first_not_of( delimeters, 0 ); // you're spelling 'delimiters' wrong
tuxation.com - Linux articles, tutorials, and discussions