c语言main函数的变元执行问题(10分)

  • 主题发起人 suibian424
  • 开始时间
S

suibian424

Unregistered / Unconfirmed
GUEST, unregistred user!
为什么在c语言中,用变元后经过编译,连接 生成exe文件,在操作系统下双击该文件,为什么命令窗口不能保持?
如下边的程序
#include "stdio.h"
#include "stdlib.h"
int main(int argc,char *argv[])
{
if(argc!=2)
{
printf("you forgot to type the name./n");
exit(1);
}
printf("the result: %s",argv[1]);
return 0;
}
 
你可以在tc环境的file菜单中选择OS shell执行
 
接受答案了.
 

Similar threads

I
回复
0
查看
672
import
I
I
回复
0
查看
592
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
635
import
I
顶部