I have made some handy things since i have to read words and dwords often but i think something is wrong with them
could someone tell me what is wrong with them
Code://these do NO checking so to figure out if there was an eof try if( rety=(EOF<<8 | EOF)){end of file //but you might need some type mods unsigned short int getword(FILE *fp){ unsigned short int rety; rety=(getc(fp)<<8) | getc(fp); //tmp[0] return rety; } //no checking on this one either use this forumla //if( rety=((EOF<<8 | EOF)<<16)|(EOF<<8 | EOF) ){end of file; but you might need some type mods unsigned int getdword(FILE *fp){ unsigned int rety; rety=(getword(fp)<<16) | getword(fp); return rety; }