sreeharitk
August 15th, 2012, 03:27 PM
Hi all
Happy greetings to all of UBUNTU !!!!!!!!!!!! :):):):)
Hope everybody celebrating life in Planet Earth :):):)
Thanks for the great help provided so far :)
The following program is written for reading text string from a file but it is only reading first word. how to over come that?
#include <iostream>
#include <fstream>
using namespace std;
int read()
{
ifstream in ("char.txt");
char str[67];
in>>str;
cout<<str<<endl;
return 0;
}
The output should be " This is a string"
However it returns only " This"
how to overcome this??!!
Happy greetings to all of UBUNTU !!!!!!!!!!!! :):):):)
Hope everybody celebrating life in Planet Earth :):):)
Thanks for the great help provided so far :)
The following program is written for reading text string from a file but it is only reading first word. how to over come that?
#include <iostream>
#include <fstream>
using namespace std;
int read()
{
ifstream in ("char.txt");
char str[67];
in>>str;
cout<<str<<endl;
return 0;
}
The output should be " This is a string"
However it returns only " This"
how to overcome this??!!