I'm quite sure I downloaded ("Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2"). I'm going to unistall this version (whatever it is, I'm not sure) and install (devcpp-4.9.9.2_setup.exe). Just to eliminate that.
This is what I get when I to compile this program:
Code:
#include <iostream>
int main()
{
std::cout << "Enter two numbers:" << std::endl;
int v1, v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 << " and " << v2
<< " is " << v1 + v2 << std::endl;
return 0;
}
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\prog\ghfgjh.cpp" -o "C:\prog\ghfgjh.exe" -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" -L"C:\Dev-Cpp\lib"
C:\prog\ghfgjh.cpp:1:20: iostream: No such file or directory
C:\prog\ghfgjh.cpp: In function `int main()':
C:\prog\ghfgjh.cpp:4: error: `cout' is not a member of `std'
C:\prog\ghfgjh.cpp:4: error: `endl' is not a member of `std'
C:\prog\ghfgjh.cpp:6: error: `cin' is not a member of `std'
C:\prog\ghfgjh.cpp:7: error: `cout' is not a member of `std'
C:\prog\ghfgjh.cpp:8: error: `endl' is not a member of `std'
Execution terminated
If I try to compile this program:
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "This should display." << endl; //no need for std::
return 0;
}
I get:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\prog\ghfgjh.cpp" -o "C:\prog\ghfgjh.exe" -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" -L"C:\Dev-Cpp\lib"
C:\prog\ghfgjh.cpp:1:20: iostream: No such file or directory
C:\prog\ghfgjh.cpp: In function `int main()':
C:\prog\ghfgjh.cpp:6: error: `cout' undeclared (first use this function)
C:\prog\ghfgjh.cpp:6: error: (Each undeclared identifier is reported only once for each function it appears in.)
C:\prog\ghfgjh.cpp:6: error: `endl' undeclared (first use this function)
Execution terminated