Closed. This question is off-topic. It is not currently accepting answers. Learn more
想改进这个问题吗?Update the question所以堆栈溢出的值小于aa>。
我试图使用fnmatch.h中的on-topic函数
printf("match: %i") ,fnmatch("hello", "hello world", 0);
上面印了一个很大的负数。电话应该是什么样子?

最佳答案

你不小心用了C的逗号运算符。我认为您希望将返回值fnmatch传递给printf,因此应该将该行更改为:

printf("match: %i", fnmatch("hello", "hello world", 0));

关于c - 如何使用fnmatch ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36757379/

10-11 18:38