casting const unsigned char * to string

This is a discussion on casting const unsigned char * to string within the C Programming forums, part of the General Programming Boards category; Hi All, Looking for a piece of code that will cast const unsigned char * to string. Thanks in advance! ...

  1. #1
    Unregistered
    Guest

    Angry casting const unsigned char * to string

    Hi All,

    Looking for a piece of code that will cast const unsigned char * to string.

    Thanks in advance!
    Arun

  2. #2
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    Location
    Munich, Germany
    Posts
    224
    const unsigned char* a="Zeeshan";
    string b = (string)a;

    - right ???

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. Drawing Program
    By Max_Payne in forum C++ Programming
    Replies: 21
    Last Post: 12-21-2007, 04:34 PM
  3. A Question About Unit Testing
    By Tonto in forum C++ Programming
    Replies: 2
    Last Post: 12-14-2006, 07:22 PM
  4. Another overloading "<<" problem
    By alphaoide in forum C++ Programming
    Replies: 18
    Last Post: 09-30-2003, 10:32 AM
  5. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 11:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21