Problemer med iostream.h
Hej Alle!Her er lidt kode:
#include <iostream.h>
void main(void)
{
cout << "Hello world!";
}
Hvorfor giver denne nemme og simple kode denne fejl i dev compileren?:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\cpp\start.cpp" -o "C:\cpp\start.exe" -I"C:\compiler\Dev-Cpp\include\c++\3.3.1" -I"C:\compiler\Dev-Cpp\include\c++\3.3.1\mingw32" -I"C:\compiler\Dev-Cpp\include\c++\3.3.1\backward" -I"C:\compiler\Dev-Cpp\lib\gcc-lib\mingw32\3.3.1\include" -I"C:\compiler\Dev-Cpp\include" -L"C:\compiler\Dev-Cpp\lib"
In file included from C:/compiler/Dev-Cpp/include/c++/3.3.1/backward/iostream.h:31,
from C:/cpp/start.cpp:1:
C:/compiler/Dev-Cpp/include/c++/3.3.1/backward/backward_warning.h:32:2: warning: #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.
C:/cpp/start.cpp:3: error: `main' must return `int'
Execution terminated
Det er kode jeg har fundet i en gammel c++ bog, så er det fordi det er forældet?
Mvh Rasmus