We are using:
 
VisualAge C++ Professional / C for AIX Compiler, Version 6, on AIX 5.2
 
We are experiencing problems accessing large (2GB+) files using the RW C++
standard libraries. We do not have the same problem when we use the AIX STL.
 
Is there a work around or a fix for this issue?
 
#include <string>
#include <fstream>
int main(int argc, char**argv)
{
    std::ifstream i;
    try
    {
        i.open("/tmp/myLargefile",std::ios::in);
 
        if ( i.good() )
        {
            char s[1024];
            i >> s ; // .getline(s, 100);
            std::cout << s << std::endl;
        }
        else
        {
            std::cout << "Open error\n";
        }
    }
    catch(...)
    {
        std::cout << "error\n";
    }
    return 0;
}
 
Jeremy

Reply via email to