No, it's an instance of this datatype:
You only need one, you are going to overwrite it at each iteration of the while loop. However, there is a mistake in that code I posted [corrected] -- since tmp is not a pointer you need to use the & address of operator:Code:typedef struct { char ISBN[20]; char Author[SIZE]; char Title[SIZE]; }record_structure;
You picked kind of an unfortunate day to look for advice here -- everyone is probably out enjoying the holiday and totally gorgeous weather on the eastern seaboard.Code:while (fread(&tmp, sizeof(record_structure), 1, record_file)) {
On the bright side, as Adak says, presuming the rest of your code compiles and works, you are perhaps not far from being done. I'll probably be in and out all night, don't give up. The more information and explanation you can provide in this case the better.![]()
If your existing code does not compile and work -- well, this is going to be a "learning the hard way" kind of lesson, which you should take to heart because to err is human, but learning the hard way is human too and don't miss out on that.![]()



LinkBack URL
About LinkBacks




