[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GCC



Mike M <linux-support@earthlink.net> writes:

> They didn't eliminate the extension.  They just sternly say you
> shouldn't use .h extrensions anymore.  

No, they didn't They said all standard headers, and only standard
headers,  don't have any extensions.

>> Not also that if you want to include C headers (e.g., stdlib.h), the
>> correct include is
>> 
>>  #include <cstdlib>
>> 
>> NOT
>> 
>>  #include <stdlib.h>
>
> The C standard committee has surely lost its way if this is true. I'll 
> change when there's something in it for me:

This is just for C++. In C, you still use stdlib.h, but in C++, to
include some of the standard C headers, you do
#include <cstdlib>
instead.

The old <stdlib.h> will still be available in the C++ standard, but the
functions and variables won't be in the std namespace.

-- 
John L. Fjellstad web: http://www.fjellstad.org/ Quis custodiet ipsos
custodes



Reply to: