By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,948 Members | 1,213 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,948 IT Pros & Developers. It's quick & easy.

istringstream ?

P: n/a
Please help why this code not compile.
//////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <string>
#include <fstream>
using namespace std;

////////////////////////////////////////////////////////////
// this code just read data from "test.txt"
// put each line in string input_line
// and print it out
////////////////////////////////////////////////////////////
int main (void){

ifstream in ("test.txt");
string line;
while (getline(in,line)){
istringstream stream(line);
}
return 0;
}

Nov 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
tv****@hotmail.com wrote:
Please help why this code not compile.
//////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
using namespace std;

////////////////////////////////////////////////////////////
// this code just read data from "test.txt"
// put each line in string input_line
// and print it out
////////////////////////////////////////////////////////////
int main (void){

ifstream in ("test.txt");
string line;
while (getline(in,line)){
istringstream stream(line);
}
return 0;
}


--
Marcus Kwok
Nov 22 '05 #2

P: n/a
tv****@hotmail.com wrote:
Please help why this code not compile.

In the future, help us out by including the compilation error messages.

Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.