I'm sure this question has been asked here before, but I've searched and haven't found the answer I'm looking for.
In C, NOT C++ (using stdio), suppose I write a value to a file:
Now, how do I read this integer value from the file, since it's stored across two bytes, and get 1500 as an integer again?Code:FILE *fp = fopen ("data.txt", "wb"); int myValue = 1500; fwrite (&myValue, 2, 1, fp);



LinkBack URL
About LinkBacks


