-=> Quoting Michael Heid to All
MH> I am VERY new to C++ and am learing about editing files... anyways, I
MH> was wondering if their was a way (when using: ofstring
MH> output("c:\xx");) to edit hexidecimal offsets directly?
Use ofstream::write rather than the inserter operator (<<).
MH> void main()
MH> {
MH> ofstream output("wdial.001")
MH> output << "..n........j.@.......f.@";
MH> }
MH> -----------------------------
MH> Notice the "." are all the 00
MH> hex character.
Ah, but 00 is also the "nul" character that signifies the end of a string in
C/C++. You don't want to write a string, which is what you're doing, but a
byte array - which is why you want to use write().
output.write(...); // I don't recall the params.. :-/
... I am Windoze of Borg. Your disk space will be assimilated.
--- FastEcho 1.46
---------------
* Origin: House of Fire BBS - Toronto - (416)601-0085 - v.34 (1:250/536)
|