#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
int main()
{
//system("clear");
cout<<"\npls input the file where you want to read the data from\n";
string loc;
getline(cin,loc);
ifstream g;
g.open (loc.c_str(),ios::in);
string data;
g>>data;
cout<<"\n\n\n\n";
cout<<"\nthe data read from the file is\n";
cout<<endl<<data;
return 0;
}
even if fiole being read contains a full line of entries(separated by say spaces) then too output is the first word only....??