CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: text to binary

  1. #1
    Guest

    text to binary

    I want to change text in a text box to binary. Meaning if I enter "Brad" in a text box and click convert I want "01000010011100100110000101100100" to come up in another text box. (using MFC dialog based program with VC++ 6.0) Thanks.

    Br@d


  2. #2

    Re: text to binary

    Hey,

    Not sure what you mean, but you could step through each character (if it's in a CString) converting each to TCHAR, then UINT. This gives you the number (base 10), then use itoa to convert it to a string base 2 and concatonate each character back together.

    This is more a strategy than a solution.

    Simon


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured