Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Converting CString to Hexadecimal and Vice Versa - MFC

bearhuggs813bearhuggs813 Member Posts: 4
Howdy?!

I don't have any history with MFC, much more with C++. And I need to make a class, which converts CString to Hexadecimal and vice-versa.

Any ideas on how to work this one out?

Thanks in advance.

Comments

  • fish9527fish9527 chinaMember Posts: 4

    Howdy~
    maybe you can try it ^.^
    //////////////////////////////////////////////
    CString a(“12 34”);
    BYTE x[2];

    x[0] = strtol(a.Left(2),NULL,16);
    x[1] = strtol(a.Right(2),NULL,16);
    /////////////////////////////////////////////

Sign In or Register to comment.