koger
asked on
read from/write to file
Could anybody give me a simple exaple about how to store information in a file and retrieve then again
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi
in the write line, what does this mean?
(char*)&o1
Is this the normally used way to write to file today, it seems a little DOS'ed
Can you explain me how this works
reinterpret_cast<char * >( &x[1] )
x: array of char
in the write line, what does this mean?
(char*)&o1
Is this the normally used way to write to file today, it seems a little DOS'ed
Can you explain me how this works
reinterpret_cast<char * >( &x[1] )
x: array of char
(char*)&o1
what ever in the object on o1 (i.e., either int or char or double) it will be stored as strings in file.
thanks
suresh kumar
what ever in the object on o1 (i.e., either int or char or double) it will be stored as strings in file.
thanks
suresh kumar
ASKER
ok you didn't what to comment:
Is this the normally used way to write to file today, it seems a little DOS'ed?
Thanks
koger
Is this the normally used way to write to file today, it seems a little DOS'ed?
Thanks
koger
hi koger
Yeah, till today i used this.If you know updated way( i.e., writing in to file). please tell me,I am waiting for your answer.Since i am very intersted to know new things.otherwise give me sometime i will confirm and comeback to you
thanks
suresh kumar
Yeah, till today i used this.If you know updated way( i.e., writing in to file). please tell me,I am waiting for your answer.Since i am very intersted to know new things.otherwise give me sometime i will confirm and comeback to you
thanks
suresh kumar
ASKER
in the write line, what does this mean?
(char*)&o1
Is this the normally used way to write to file today, it seems a little DOS'ed
Can you explain me how this works
reinterpret_cast<char * >( &x[1] )
x: array of char