I have this source and im trying to use it on linux:
the content of "texto" is:Code:#include <iostream> #include <sstream> #include <fstream> using namespace std; int main () { char c; ifstream in_file("./texto"); ostringstream var1; while (in_file.get(c)) { var1 << c; } cout << var1.str() << endl; return 0; }
to compile with g++-4.3:Code:teste1 teste2
then i have this:Code:$ g++ teste2.cc -o teste
using the linux to read the file texto dont show anything after line2:Code:fbs777@Linux1:/tmp$ ./teste teste1 teste2 fbs777@Linux1:/tmp$
Code:fbs777@Linux1:/tmp$ cat ./texto teste1 teste2 fbs777@Linux1:/tmp$



LinkBack URL
About LinkBacks


