Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    3,853,082.25
    Rep Power
    220

    Default Text To Hex Converter[C++]

    This is similar to my Char to hax/deci but u can do a string such as a word the value generated is same value as u would see in nitepr or ps2dis
    Code:
    /*
      Name: Text Converter
      Author: SonniE
      Date: 02/06/08 04:30
      Description: www.codinghs.com original program
    */
    
    #include <iostream>
    #include <string>
    using namespace std;
    int main()
    {
         char text[16];
         char ans, var;
         cout << "Welcome TO SonniE's Text To Hex! A WWW.codinghs.COM Original\n";
    here:
         var = 0;
         cout << "Enter Your Text: ";
         std::cin>>text;
         std::cout << "Text: "<< text <<"\nHexadecimal Value: "; 
         do{
                  cout<< hex << int(text[var]);
                  var++;
                   }while (text[var] != '\0');
         cout<< "\n";
         system("PAUSE");
         cout << "Do You Want To Convert Another Character? (y/n)";
         cin >> ans;
         if (ans == 'y' || ans == 'Y')
         {
                 system("cls");
                 goto here;
         }
         else 
         {
              system("pause");
         }
         return 0;
    }
    Heres An Example of this app in action
    Code:
    Welcome TO SonniE's Text To Hex! A WWW.codinghs.COM Original
    Enter Your Text: SonniE
    Text: SonniE
    Hexadecimal Value: 536f6e6e6945
    Attached Files


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

Posting Permissions

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