Thread: Compiling a program in VC++ and run it in DOS

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    1

    Compiling a program in VC++ and run it in DOS

    Can the VC++ be set to compiler a 16-bit exe. program so that it can be run in DOS.
    i've tried compiling a "Hello world" prgramme using VC++ and Turbo C. The first one cannot be run in DOS but the later one can.
    Why?

    # include <iostream.h>

    int main()
    { cout<<"Hello\n";
    return 0;
    }

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    1 is a dos compiler....1 is a win32 compiler....

    The dos prog created can run in windows (because windows allows it to), but the windows program cannot be run in DOS...

    Personally, I would dump the DOS compiler and focus on windows....DOS is dead!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to run C code under VC environment?
    By robin in forum C Programming
    Replies: 12
    Last Post: 04-06-2005, 11:19 AM