PDA

View Full Version : This Program cannot be run under dos?



Cgawd
10-21-2002, 09:39 AM
I get this error "This Program cannot be run under dos" when i compile and try to run this.


#include <iostream.h>

int main()
{
std::cout << "Test\n";
int x;
std::cin >> x;
return 0;
}


do i not know something?

Magos
10-21-2002, 11:05 AM
You use the old *.h and the new std namespace?

BMJ
10-21-2002, 11:58 AM
What compiler are you using?

9/10 of the voices in my head believe that you are compiling a Win32 Console app

Cgawd
10-21-2002, 01:33 PM
i learned to use iostream.h? umm u have to use namespace std or something? talk to jessie liberty about that one.
how do u compile a dos exe? special compiler or someting?

BMJ
10-21-2002, 03:52 PM
You would need a genuine DOS compiler, like Turbo C.

Cgawd
11-09-2002, 12:48 PM
life makes sense now, though i said screw dos, and got MSVC++ :-D