V
vivek.astvansh
Guys,
I have the following piece of code.
int myClass::myfn()
{
std::ifstream myFile;
myFile.open("/home/astvansh/devmap");
std::string line;
getline(myFile, line);
....
}
"devmap" is a text file. getline( ) returns an empty string on HP-UX,
but reads the text file successfully on Solaris and HP-UX. This code is
compiled using a proprietary STL library.
I wrote this program separately as test.cpp, built it using
"/opt/aCC/bin/aCC test.cpp", and it worked well on HP-UX. Hence, the
only difference is in the build environment.
I suspect the problem is because of _STL namespace. The object myfile
in my code is
of type _STL::basic_istream.
May someone please help me.
Thanks very much.
I have the following piece of code.
int myClass::myfn()
{
std::ifstream myFile;
myFile.open("/home/astvansh/devmap");
std::string line;
getline(myFile, line);
....
}
"devmap" is a text file. getline( ) returns an empty string on HP-UX,
but reads the text file successfully on Solaris and HP-UX. This code is
compiled using a proprietary STL library.
I wrote this program separately as test.cpp, built it using
"/opt/aCC/bin/aCC test.cpp", and it worked well on HP-UX. Hence, the
only difference is in the build environment.
I suspect the problem is because of _STL namespace. The object myfile
in my code is
of type _STL::basic_istream.
May someone please help me.
Thanks very much.