Thread: Printf Question
View Single Post
  #5   Spotlight this post!  
Unread 06-03-2004, 22:59
Daniel Daniel is offline
Daniel Katanski
#0240
Team Role: Mentor
 
Join Date: Feb 2004
Location: Monroe, MI
Posts: 32
Daniel is on a distinguished road
Re: Printf Question

If you read the file "printf_lib.c" (I think) you will see a comment that says "%c" is not supported. The best you are going to do is put the character into a char array two long setting your character in location 0 and '\0' (or zer0) in location 1, then print it using "%s" as the format and using the array name.

char t [2];
t [0] = 61; // Or what ever you character is.
t [1] = '\0' // Null character.
printf ("%s\n", t);