If the file contains several lines as you described then after getline() you can use stringstream to divide it up into individual integers. Also note the difference in the while statement -- using eof() like that doesn't work.
#include <sstream>
<snip>
string line;
ifstream myfile("input.txt");
if(myfile.is_open()){
while(getline(myfile, line) )
cout << line << "\n";
int value;
stringstream str(line);
while( str >> value)
cout << value << "\n";
}//while
myfile.close();
}//if
else cout << "Unable to open file" << endl;
>>I was wondering if there is a string tokenizer function for c++ such as the one from Java
I dont' think so.