作者:
pex2004 (想到再說)
2014-11-09 00:53:00開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
gcc
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
結構初始化問題
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
正確版:http://ideone.com/jb3AQP
錯誤版:http://ideone.com/VEUexX
這兩個code,差別在於錯誤版是struct 後,
直接給一個結構變數start,
然後再設定start這個初始值,
但是compiler以後卻不能過,這是為什麼?
因為把初始值(14、15行)拿掉後,又可以compiler。
補充說明(Supplement):