Rookie worker
菜鳥工程師的學習心得筆記
2010年11月24日 星期三
C語言- incompatible types in assignment
如果使用陣列的方式宣告字串,則不可以直接使用=指定運算子另外指定字串
Ex.
char str[] = "hello";
str = "world"; // error, incompatible types in assignment
Reference:
http://caterpillar.onlyfun.net/Gossip/CGossip/PointerAndString.html
沒有留言:
張貼留言
‹
›
首頁
查看網路版
沒有留言:
張貼留言