Article on scanf missing information.

The article on scanf here is missing the following type/conversion specifiers:
%a argument type float*

%p argument type void**

%S argument type wchar_t*

%[charset] argument type *char which gets a sequence of characters from the set.

%i argument type int* gets anything recognised by strtol(s,0).

%n argument type int* does not read anything, writes in the number of bytes read so far.

%% matches a %.

The following type modifiers are missing:
%lld argument type turns to long long*.

%jd argument type turns to intmax_t*.

%zd argument type turns to size_t*.

%ls argument type turns to wchar_t*.


There are similar omissions in the article on printf.
Last edited on
C++ is based on C89 not C99
Not anymore.
Cubbi wrote:
Not anymore.

Yes, it still is.
Last edited on
Unless the admin to wait until C++11 is better supported decided, soon the updates made will be.
Last edited on
The current C++ standard says, in ยง1.2[intro.refs]/2,

The library described in Clause 7 of ISO/IEC 9899:1999 and Clause 7 of ISO/IEC 9899:1999/Cor.1:2001 and Clause 7 of ISO/IEC 9899:1999/Cor.2:2003 is hereinafter called the C standard library.

(and scanf is later listed as one of the 209 functions from the C standard library included in C++)
Last edited on
Topic archived. No new replies allowed.