M
mathieu
Hi,
Does anyone has a portable way of comparing a streampos to 0 ?
I tried:
if( is.tellg() == 0 ) {}
but this fails on gcc 4.0
and
if( is.tellg() - 0 == 0 ) {}
but this fails with gcc 4.5
ref:
#include <fstream>
int main()
{
std::ifstream is( "bla.txt" );
if( is.tellg() == 0 ) {}
return 0;
}
thanks
Does anyone has a portable way of comparing a streampos to 0 ?
I tried:
if( is.tellg() == 0 ) {}
but this fails on gcc 4.0
and
if( is.tellg() - 0 == 0 ) {}
but this fails with gcc 4.5
ref:
#include <fstream>
int main()
{
std::ifstream is( "bla.txt" );
if( is.tellg() == 0 ) {}
return 0;
}
thanks