【发布时间】:2012-08-22 19:37:10
【问题描述】:
我的 C 代码中出现此错误。我不知道我做错了什么。如果我评论这段代码,我的程序就可以工作。 这段代码在 int main() 中。
if(argc!=2 && strcmp(argv[0],"selection-sort")==0 && strcmp(argv[1],"input.txt")==0 && strcmp(argv[2],"output.txt")==0)
{
printf("The command line arguments are correct.\n");
}
else
{
printf("The command line arguments are wrong.I am exiting.\n");
break;
}
【问题讨论】:
-
但这就是我编译时遇到的错误..
-
1787 声望的人怎么会问这种问题?
-
@James OP 来自 SQL。不是 C。
-
-1 "这个问题没有显示任何研究工作"
标签: c if-statement break