Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
fread/fwrite
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="James Kuyper, post: 5029586"] Even there. Section 2 of annex C of the C++ standard has 3 1/2 pages listing the ways in which the C++ version of the C standard library differs from the C version. Unless you're familiar with precisely what those differences are, you shouldn't assume that information about the C++ version will be valid for the C version. Since only C/C++ experts are likely to have that information, it's generally not a good idea for a newbie to go to the wrong place for such information. The only difference that matters for stdio.h is that NULL is a required to be a C++ null pointer constant, rather than a C null pointer constant. The simplest consequence is that NULL cannot expand to an expression with type void*. The other consequence is that NULL can expand to any one of several types of things that would not qualify as integer constant expressions in C, such as: 1. An expression referring to a non-volatile const-qualified object of integral or enumeration type, initialized with a integer constant expression. 2. A value of type std::nullptr_t, such as nullptr. 3. A call to a constexpr function or constructor. Offhand I can't come up with any way for this difference to affect a strictly conforming C program, unless it makes use of the new C2011 _Generic feature, which is not (yet?) a part of C++. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
fread/fwrite
Top