Im using net-beans 7.2 if i run helloworld.cpp its showing error that cannot find include file (IDE cannot able to recognize any .h files ). i installed gcc, im useing Fedora 16, im trying to use CUDA plugin.

3 Answers
3

In C++, you usually dont use the .h extension for header files. For C++ header files, directly use the filename which in this case would be

#include<iostream>

Using iostream.h is deprecated.

Also write

using namespace std;

preferably after decalring all header files to import all symbols in the standard namespace into your code. That way, you wont have to write std:: everytime you want to use one. If you're not getting what im talking about, please refer this link - http://www.cplusplus.com/doc/tutorial/namespaces/. Understanding this is important.

For your usual C header files, usually you have to prefix a 'c' before the filename and remove the .h extension. For example,

It's not deprecated, it never was part of the standard.
–
Paul MantaAug 11 '12 at 5:38

@PaulManta Yeah, not part of the "official" standard. It was supported from Stroustrup's version and compilers do say "its deprecated". Thats why i wrote that !!
–
CygnusAug 11 '12 at 6:13

2

@PaulManta: You know, C++ actually existed for almost 20 years before "the standard" you refer to. During that time, the de-facto c++ standard did in fact include <iostream.h>.
–
Benjamin LindleyAug 11 '12 at 6:39