code:
#include <iostream.h>
#include <conio.h>
#include <limits.h>
#include <stdio.h>
main(char oper;)
{
{
float zahl, zahl2;
cout<<"Bitte geben Sie eine Zahl ein ";
cin>>zahl;
cout<<"Bitte geben Sie eine zweite Zahl ein ";
cin>>zahl2;
cout<<"Bitte geben Sie den gewuenschten Rechenoperator ein ";
cin>>oper;
}
{
if(oper=='+')
cout<<"Ergebnis: "zahl+zahl2;
}
getch();
}
Fehlermeldungen:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Übung\Makefile.win"
Führt make... aus
make.exe -f "C:\Dev-Cpp\Übung\Makefile.win" all
g++.exe -c main2.cpp -o main2.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31,
from main2.cpp:1:
C:/Dev-Cpp/include/c++/3.4.2/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 <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
main2.cpp:6: error: expected `,' or `...' before ';' token
main2.cpp:6: error: expected `)' before ';' token
main2.cpp:6: error: expected constructor, destructor, or type conversion before ';' token
main2.cpp:6: error: expected unqualified-id before ')' token
main2.cpp:6: error: expected `,' or `;' before ')' token
make.exe: *** [main2.o] Error 1
Ausführung beendet