Thread: What is a ' unsigned char *s '

  1. #1

    What is a ' unsigned char *s '

    What is a ' unsigned char *s '

    I want to use this function:
    void textout(BITMAP *bmp, FONT *f, unsigned char *s, int x, y, int color);

    I am trying to put a Var into the unsigned char *s but I can't use a string. If I use a char I could only use one char.. right?

    What kind of var do I use to place a string of text in a unsigned char *s ??

    Am I asking the right question?? I don't know.... lol

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    but I can't use a string
    Why not? If by string you mean the c-style one then you could either create an unsigned array and pass it in, or cast a signed string to an unsigned one in your function call.

    If you mean a c++ STL string then you can use the c_str() member function with an unsigned cast in your function call.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 06-16-2006, 09:23 PM
  2. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 02:49 PM
  3. problem with reading and writing
    By yahn in forum C++ Programming
    Replies: 2
    Last Post: 01-03-2006, 04:38 PM
  4. Swap a bit
    By mr_nice! in forum C Programming
    Replies: 7
    Last Post: 03-01-2004, 03:15 AM
  5. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 01:18 AM