B
Bill Cunningham
Since printf returns the number of characters without the '\0' how do
people check printf's return value for errors in the mainstream. My idea
since I'm dealing with unsigned ints is simply to count the characters. For
example,
int pe;
unsigned int variable;
if ((pe=printf("%.2u\n",variable))==0
return -1;
Would that take care of all kinds of returns ? What about negative returns?
I've never done error checking with printf before.
B
people check printf's return value for errors in the mainstream. My idea
since I'm dealing with unsigned ints is simply to count the characters. For
example,
int pe;
unsigned int variable;
if ((pe=printf("%.2u\n",variable))==0
return -1;
Would that take care of all kinds of returns ? What about negative returns?
I've never done error checking with printf before.
B