Re: [cc65] Error: Incompatible pointer types

Date view Thread view Subject view

From: Ullrich von Bassewitz (
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.

        scanf   - reads from stdin 
        sscanf  - reads from a string passed to the function



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-11-23 21:31:53 CET