Results 1 to 4 of 4

Thread: difficulty in conversion

  1. #1
    Join Date
    Oct 2009
    Location
    chennai,india
    Posts
    66
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Red face difficulty in conversion

    hi all
    im creating a qt application that stores hexadecimal values in the database.
    like 12aede23eacbaadf. So from the application i need to send the some protocol.
    The protocol is obviously a character array (ie.,char proto[20])
    so in the protocol ,i have to mention the hexavalues,into the character array..like below

    proto[0]=0x12;
    proto[1]=0xae;
    proto[2]=0xde;
    proto[3]=0x23;
    proto[4]=0xea;
    proto[5]=0xcb;
    proto[6]=0xaa;
    proto[7]=0xdf;

    i have tried, many ways ..can any one help me??
    any help is highly respected...
    thanks

  2. #2
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: difficulty in conversion

    0x is converting to hex, NOT CHAR.

  3. #3
    Join Date
    Oct 2009
    Location
    chennai,india
    Posts
    66
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: difficulty in conversion

    hi vieraci
    yes i want to convert from string into hex ,but what i meant is ,it should be stored in a char array...
    thanks....

  4. #4
    Join Date
    Apr 2007
    Location
    Sunny Darwin, NT Australia
    Posts
    186
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: difficulty in conversion

    You will have to write your own function to do this.

Similar Threads

  1. Auto threshold value of monochrome conversion
    By M. Bashir in forum Qt Programming
    Replies: 5
    Last Post: 26th November 2009, 12:17
  2. Two Byte character Support
    By rajveer in forum General Programming
    Replies: 10
    Last Post: 25th October 2008, 00:29
  3. wchar to T50 conversion
    By rajveer in forum General Programming
    Replies: 1
    Last Post: 29th August 2008, 13:32
  4. QString iso 8859-1 conversion
    By mattia in forum Newbie
    Replies: 11
    Last Post: 21st January 2008, 14:17
  5. UTF8 to ISO 8859... conversion
    By claudio in forum Qt Programming
    Replies: 3
    Last Post: 29th December 2007, 21:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.