This Program cannot be run under dos?

This is a discussion on This Program cannot be run under dos? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I get this error "This Program cannot be run under dos" when i compile and try to run this. Code: ...

  1. #1
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405

    This Program cannot be run under dos?

    I get this error "This Program cannot be run under dos" when i compile and try to run this.
    Code:
    #include <iostream.h>
    
    int main()
    {
       std::cout << "Test\n";
       int x;
       std::cin >> x;
       return 0;
    }
    do i not know something?

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You use the old *.h and the new std namespace?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    What compiler are you using?

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

  4. #4
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405
    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?

  5. #5
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    You would need a genuine DOS compiler, like Turbo C.

  6. #6
    Banned Cgawd's Avatar
    Join Date
    Oct 2002
    Posts
    405
    life makes sense now, though i said screw dos, and got MSVC++ :-D

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to time how long a program takes to run?
    By advancedk in forum C Programming
    Replies: 2
    Last Post: 08-18-2008, 08:50 PM
  2. Replies: 4
    Last Post: 07-24-2008, 10:02 AM
  3. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  4. program won't run standalone
    By richard in forum C++ Programming
    Replies: 2
    Last Post: 07-20-2002, 07:21 PM
  5. initialising a DOS program from a C enviroment
    By Robert_Ingleby in forum C Programming
    Replies: 5
    Last Post: 03-07-2002, 01:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21