incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Dean <d...@roguewave.com>
Subject Opening Large files on AIX
Date Thu, 10 Nov 2005 21:45:58 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message