Outline ·
[ Standard ] ·
Linear+
C++ ifstream, problem T.T
TSden
|
Mar 26 2006, 09:14 AM, updated 19y ago
|
|
after getline(myfile,line);
then the string line contains a string of continuous hexadecimal numbers eg. FF122E....
which library function can i use to 'chop' it into separate hexadecimal numbers so that i can use it to convert back to ascii character?
|
|
|
|
naim_mahmood
|
Mar 26 2006, 01:09 PM
|
Getting Started
|
QUOTE(den @ Mar 26 2006, 09:14 AM) after getline(myfile,line); then the string line contains a string of continuous hexadecimal numbers eg. FF122E.... which library function can i use to 'chop' it into separate hexadecimal numbers so that i can use it to convert back to ascii character? <string.h> checkout on string manipulation http://forum.lowyat.net/index.php?showtopi...hl=naim_mahmood
|
|
|
|
dstl1128
|
Mar 27 2006, 10:58 AM
|
|
There's no one single function that could chop a long string without a distinctive seperator.
Your best bet are strncpy(), sscanf(), and your own indexing loops.
|
|
|
|