开发者

run c programmes from cmd / dos in xp

开发者 https://www.devze.com 2022-12-22 05:22 出处:网络
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 nam

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
0

精彩评论

暂无评论...
验证码 换一张
取 消