Thread: send() characters from integers

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    11

    send() characters from integers

    If i use the following statement:
    Code:
    printf("%c",number);
    the ascii correspondent to 'number' will be printed, how can i do the same with the send command?

    this is an example of the send() command:
    Code:
    send(socket,character,1,0);
    but for this, i cannot convert the variable type when i send it...

    is there a way to send variables using the '%c', '%d' etc. constants?
    Last edited by joecaveman; 05-17-2005 at 07:08 PM. Reason: make title more descriptive

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  2. sending n no of char data uning send() function,
    By thebrighter in forum Windows Programming
    Replies: 1
    Last Post: 08-22-2007, 12:26 PM
  3. send zip file via socket
    By WaterNut in forum C Programming
    Replies: 11
    Last Post: 05-24-2005, 11:49 AM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. Characters in a txt file.
    By tay_highfield in forum C Programming
    Replies: 3
    Last Post: 01-31-2003, 09:19 AM