- 论坛徽章:
- 0
|
本帖最后由 三月开桃花 于 2012-02-16 21:43 编辑
源代码:- #include <stdio.h>
- #include <stdlib.h>
- void printStr(char *str);
- int main(int length, char **args)
- {
- printStr("print args[0]:\n");
- printStr(args);
-
- printStr("print args[1]:\n");
- printStr(args++);
-
- getchar();
- return 0;
- }
- void printStr(char *str)
- {
- if(NULL != str)
- {
- printf("%s\n",str);
- }
- else
- {
- printf("\n");
- }
- }
复制代码 编译错误:
move.c: In function `main':
move.c:7: warning: passing arg 1 of `printStr' from incompatible pointer type
move.c:10: warning: passing arg 1 of `printStr' from incompatible pointer type
move.c:26:2: warning: no newline at end of file |
|