例如,如果用户在命令行中键入
匹配“你好”测试*in
这意味着在名称为“test”的所有.in 类型文件中找到“the”。
bool containMany=false;
int i;
for(i= 0; arguments[i]; i++){
printf("ARGUMENTS %s\n",arguments[i]);
if(strstr(arguments[i],"*")){
containMany=true;
break;
}
}
但它不起作用。论据是:
参数匹配
论据你好
参数 test0.in
参数 test1.in
参数 test2.in
那么当用户输入 "*" 时,我如何使 containsMany 变为真呢?