DEV C++... wtf... no iostream?

Joined
Sep 29, 2003
Messages
99
Reaction score
0
ok, nothing works... nothing works at all, no C++ code what so ever works... and its driving me crazy.

And in the folder with the header files, there is no iostream.h....
can someone give it to me?
 
wait!! stupid me, i found it... and here is my problem..

2 C:\Dev-Cpp\include\c++\backward\backward_warning.h:32
#warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.


what does that mean?
 
To be short, it means that whichever include file you are using is depricated and you should use the newer one, cos its out of date and is now obsolete.
 
in C++, always use include libraries without .h
say #include <iostream>
instead of #include <iostream.h>

the ones with .h are outdated, hence the warning
 
Originally posted by quaint
in C++, always use include libraries without .h
the ones with .h are outdated, hence the warning

Well not quiet true, what about
#include <conio.h> #include <windows.h>
#include <stdlib.h> #include <process.h>
and others, and thats only for Win32 Console. So you cant say that you can use only files that dont have h. and that the h. files are outdated.
Cheers ;)
 
Yes Dev-C++ likes for you to use the standard headers and such.

#include <iostream>

using namespace std;
 
actualy, there is no good reason for the files to have a .h extension and iirc the C++98 standard drops them for the standard headers. I've even seen projects which use .hpp to indicate its a C++ header (which makes sense when you consider it, .c/.h for C and .cpp/.hpp for C++)
 
C++98 dropped the .h from the standard headers to make backward compatible non-c++-standard code (ie, all code that was written for compilers before the standard was released).
conio.h is no standard header to my knowledge. C-Headers (from the standard libraries) get a leading c and drop the .h as well. (#include <cstdlib> etc...)
I would strongly discourage "using namespace std;" This only leads to confusion later in the project when you accidently hit names declared in standard headers, even if you dont use them.
I tend to say that Dev-C++ is slow like hell during compilation... At least the compiler (MingW) consumes tons of memory even for small sources.

Greetings,
Michael
 
yep, i'd advise against using 'using namespace std;' as well as you get much better context infomation by typing std::cout etc and the same applies when making your own name space, access them via name::class/function.
About the only time you can break that rule is if you are doing a VERY small program (and even then i prefer to do std::class myself) of it you are using a custom namespace in a part of the program where you arent using any other namespace, but again its not really advised.
 
Back
Top