Actually I'm trying to write another integer (the size of the file). If I typecast that the same way as my previous problem it will write in reverse. I tried putting it into another character...
Type: Posts; User: Pharrox
Actually I'm trying to write another integer (the size of the file). If I typecast that the same way as my previous problem it will write in reverse. I tried putting it into another character...
Okay, one more quick question.
How can I write a stream of bytes in reverse? There are four bytes I need to write but they always output as 4321 instead of 1234.
Well now I feel like a complete idiot. That was exactly what I was doing wrong. Well it all seems to be working now and the rest should be pretty easy.
Thanks a ton for all your help. :)
Well I got strtol() to work, but I still have to problem of how to get it to write to the file. Since file.write() only accepts arguments of character arrays I tried typecasting the integer as...
As for only writing three bytes instead of four, the fourth will always be null so it doesn't really need to be specified by the program.
I figured out what was causing the char to char error, but...
Thanks for your help.
Hmm, well I tried the subtract '0' thing, but I got an error "cannot convert char to char". Here is the code I was trying to use:
ofstream output (...
Sorry for a probably stupid question. I'm pretty new to this.
Anyway I'm writing a simple program to combine multiple files into one large file (used in certain Wii games). I've got most of it...