A
ambar.shome
Hi,
We are working on Solaris SunOS 5.8. We are using ifstream of iostream
namespace. The snippet is given below:
#include <iostream.h>
#include <fstream.h>
boolean readFile()
{
char readStr[256];
ifstream infile;
infile.open("123768_20010706_2001.csv");
if (infile.is_open())
{
while (infile.good())
{
infile.getline(readStr,256,'\n');
cout << "readStr:::="<<readStr<<endl;
}
infile.close();
}
else
{
cout << "Error opening file";
}
return true;
}
but on compilation the compiler is giving an error message that
could not find the function is_open()
is it not available on Solaris compiler??
Can anyone enlighten me on that??
We are working on Solaris SunOS 5.8. We are using ifstream of iostream
namespace. The snippet is given below:
#include <iostream.h>
#include <fstream.h>
boolean readFile()
{
char readStr[256];
ifstream infile;
infile.open("123768_20010706_2001.csv");
if (infile.is_open())
{
while (infile.good())
{
infile.getline(readStr,256,'\n');
cout << "readStr:::="<<readStr<<endl;
}
infile.close();
}
else
{
cout << "Error opening file";
}
return true;
}
but on compilation the compiler is giving an error message that
could not find the function is_open()
is it not available on Solaris compiler??
Can anyone enlighten me on that??