What is a ' unsigned char *s '

This is a discussion on What is a ' unsigned char *s ' within the C++ Programming forums, part of the General Programming Boards category; What is a ' unsigned char *s ' I want to use this function: void textout(BITMAP *bmp, FONT *f, unsigned ...

  1. #1
    SublicK
    Guest

    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
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    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.
    zen

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, 03:38 PM
  4. Swap a bit
    By mr_nice! in forum C Programming
    Replies: 7
    Last Post: 03-01-2004, 02:15 AM
  5. String sorthing, file opening and saving.
    By j0hnb in forum C Programming
    Replies: 9
    Last Post: 01-23-2003, 12:18 AM

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