Hi
I want to know some information about (( files ))
I specified two questions and I hope to answer them.
First :
using function ( read and write )
fileName.write( reinterpret_cast< const char * >( & variableName ), sizeof( Ttype ) ) ;
in binary files only or can used in text files.
Second :
this code :
fileName.seekg( ( number - 1 ) * sizeof ( type) );
what is the appropriate type which I must put it in sizeof ( type)?
is it must be the same type of number ?
it is meaning : if the number from type int , the type in sizeof is int .
and if it function in class and it return type int , the type in sizeof is ... what ?
is int or the name of class ?
and this code is doing to moving the pointer with magnitude of number ?
.. I hope to clearing ..
.. thank you to help me..