<iostream> or <iostream.h> ??
when i compile a c++ program using <iostream.h> i get the following warning
C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4. 5\..\..\..\..\include\c++\3.4.5\backward\backward_ warning.h|32|warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 188.8.131.52 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.|
||=== Build finished: 0 errors, 1 warnings ===|
but when i replace it by <iostream> it shows the error:
C:\Documents and Settings\Machine\Desktop\Untitled1.cpp||In function `int main()':|
C:\Documents and Settings\Machine\Desktop\Untitled1.cpp|5|error: `cout' was not declared in this scope|
C:\Documents and Settings\Machine\Desktop\Untitled1.cpp|5|error: `endl' was not declared in this scope|
||=== Build finished: 2 errors, 0 warnings ===|
i am using codeblocks. what should i do?
to be more specific can anyone tell why the compiler cant accept <iostream> though it suggests to do so.