|
|
 |
 |
 |
 |
ASCII To Hex Converter
Good Evening, I was wondering if anyone would be willing to help me code a ASCII to Hex Converter, I'm very good at reading code, just not writing it, It is a bit unfortunate, but any help would be great.
On Jun 7, 11:54 am, "Matthew Eagle" <pttc@dodo.com.au> wrote: > Good Evening, > I was wondering if anyone would be willing to help me code a ASCII to Hex > Converter, I'm very good at reading code, just not writing it, It is a bit > unfortunate, but any help would be great.
You can search google...there are many code scripts which demonstrate it..One link is: http://www.phptr.com/articles/article.asp?p=31783&rl=1
On 7 Juni, 08:54, "Matthew Eagle" <pttc@dodo.com.au> wrote: > Good Evening, > I was wondering if anyone would be willing to help me code a ASCII to Hex > Converter, I'm very good at reading code, just not writing it, It is a bit > unfortunate, but any help would be great.
The basic idea: #include <iostream> #include <string> int main() { std::string str = "Hello"; typedef std::string::iterator iter; for (iter i = str.begin(); i != str.end(); ++i) std::cout << std::hex << static_cast<int>(*i); }
from there you should be able to work the rest out by yourself. -- Erik Wikstrm
|
 |
 |
 |
 |
|