haz
haz

Reputation: 97

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

Upvotes: 0

Views: 555

Answers (3)

Martin Beckett
Martin Beckett

Reputation: 96147

Also Somewhere in dev-c++ there will be an entry for 'command arguments' or 'string to execute' to allow you to specify them - sorry don't know dev-c++ specifically.

Upvotes: 2

brozo
brozo

Reputation: 596

Use the dev-c++ debugger (you activate it by pressing F9). And yes, you can run C programmes from cmd. The call would be:

C:\MyProgram.exe param1 param2 param3

Upvotes: 0

Carl Norum
Carl Norum

Reputation: 225082

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

Upvotes: 6

Related Questions