作者tony21177 ()
看板C_and_CPP
標題Re: [問題] 陣列與字串的疑問
時間Wed Apr 13 22:40:43 2016
最近在讀K&R第2版,在section 5.3 Pointers and Arrays有提到一段,There is one
difference between an array name and a pointer that must be kept in mind.
A pointer is a variabe,so pa=a and pa++ are legal. But and array name is
not a variable;constructions like a=pa and a++ are illegal.
不知道和原po所要問情況是否有相關?
由於小弟也是新手,不敢妄加定論,上來請教大家,討論看看...
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 203.163.194.3
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1460558446.A.D0A.html
推 steve1012: 就是陣列不直接等於指標 但你可以拿指標去指他 04/15 10:35
→ steve1012: 知道陣列不直接等於就懂了 04/15 10:36