|
-
April 14th, 2005, 06:29 PM
#6
Re: Reading hexadecimal values for a file
You could use fstream for reading in the data but personally I dislike reading this way much of the time - I prefer to read a line at a time then tokenize it. boost::tokenizer is good for this but if you don't have that, it is simple enough to write your own in a couple of lines with std::string's "find" or "find_first_of" command.
The "0x" is used only for code and isn't part of the input/output of a hex number. You'd have to cut that off before converting (which is why tokenizing can be good in this instance).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|