This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 122206 - C++ templates use non-standard includes
Summary: C++ templates use non-standard includes
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Alexander Simon
: 90253 (view as bug list)
Depends on:
Reported: 2007-11-17 14:08 UTC by wells
Modified: 2010-04-02 05:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description wells 2007-11-17 14:08:32 UTC
I'm using netbeans 6 beta 2, and on creating a new C++ main file, the default include is:

#include <stdlib.h>

This is not standard C++. Standard C++ requires that the .h is not used for old C headers, but instead the #include <cstdlib> variation be used instead.
Comment 1 wells 2007-11-17 14:10:49 UTC
And of course to access functions etc. you have to include an appropriate using statement. The <cxx> headers wrap stuff in the "std" namespace as per 
standard C++ includes like iostream etc.
Comment 2 Vladimir Kvashin 2008-11-20 19:53:16 UTC
I see you point.

I'd like to note that you can easily change this via Tools -> Templates -> C/C++ Files.
Select the template you'd like to change, then press "Open in Editor" button and do whatever you want.

That's what I usually do with templates after installing a new NB version :)
Comment 3 Alexander Simon 2009-11-17 04:08:46 UTC
*** Bug 90253 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Simon 2009-11-17 04:10:12 UTC
P3 because two users mentioned it issue.
Comment 5 Maria Tishkova 2010-03-30 11:54:30 UTC
Sasha, please ifx it, I do not think it will take a long time, this issue exists starting from 6.0..
Comment 6 Alexander Simon 2010-03-30 12:20:40 UTC
fixed, change set:
Comment 7 Quality Engineering 2010-04-02 05:12:25 UTC
Integrated into 'main-golden', will be available in build *201004020200* on (upload may still be in progress)
User: Alexander Simon <>
Log: fixed BZ#122206 C++ templates use non-standard includes