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 lin开发者_如何学Goe 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
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
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.
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
精彩评论