From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-11-23 21:31:09
On Sun, Nov 23, 2003 at 02:24:52PM -0500, Raj Wurttemberg wrote:
> "intTest01.c(28): Error: Incompatible pointer types"
[...]
> int intNum;
> sscanf ("%d", &intNum);
The prototype for sscanf is:
int sscanf (const char* s, const char* format, ...);
So you're passing a pointer to an int where a pointer to a const char is
expected. It seems you forgot to pass the string that should be parsed.
Remember:
scanf - reads from stdin
sscanf - reads from a string passed to the function
Regards
Uz
--
Ullrich von Bassewitz uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-11-23 21:31:53 CET