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

This is a discussion on Compiling a program in VC++ and run it in DOS within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Can the VC++ be set to compiler a 16-bit exe. program so that it can be run in DOS. i've ...

  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,789
    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

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