摘要:
嗯嗯,今天写C代码遇到个warning是关于指针赋值的:char *a = "hello";int *b = a;像上面这种代码,GCC是不报错的,而是报一个warning:warning: initialization from incompatible pointer type若是:float a = 1.1;int* b = &a;也是报上面那个warning. 看来和指针指向的存储区域没关系哈。但是如过一个函数的返回值是一个指针例如:int* tmp(){.... return a; }float *b = tmp();报的warning就不一样了。warn 阅读全文
posted @ 2011-08-12 08:10
人走茶待凉……
阅读(246)
评论(2)
推荐(0)
浙公网安备 33010602011771号