A
Abubakar
Hi ,
I wrote the following code in c++ (native) to get file size:
int o_get_file_length(const char * filename)
{
ifstream f (filename, ios::binary );
f.seekg (0, ios::end );
int length = f.tellg ();
f.close();
return length;
}
Is this ok, or is there a better way to get the file size?
Regards,
-Ab.
I wrote the following code in c++ (native) to get file size:
int o_get_file_length(const char * filename)
{
ifstream f (filename, ios::binary );
f.seekg (0, ios::end );
int length = f.tellg ();
f.close();
return length;
}
Is this ok, or is there a better way to get the file size?
Regards,
-Ab.