Search code examples
cwindows-xpdos

run c programmes from cmd / dos in xp


this maybe a noobish question so sorry, is it possible to run c programmes from cmd?

I am in the process of creating a programme that takes 3 command line arguments, a string seperator and 2 file names and i have conditions such as if more or less command line items are passed then print an error etc

i cannot test this from dev-c++ as i dont no how and would find it easier to use cmd i guess

thanks for the help


Solution

  • Yes, you can do that:

    c:\> cd c:\directory\where\the\program\is
    c:\directory\where\the\program\is> program arg1 arg2 arg3 separator file1 file1