[問題] 新手問題

作者: rayark2016 (rayark)   2018-10-17 07:32:26
開發平台(Platform): (Ex: Win10, Linux, ...)
win10
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
visual studio 2017
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
https://i.imgur.com/HVILwoa.png
為何第14行會顯示錯誤碼C4146?
還有我想知道變數'0'怎麼打(包括單引號
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版,禁止使用圖檔)
補充說明(Supplement):菜雞自學,請多多包涵
作者: jianda1996 (南無兩光有手槍)   2018-10-17 10:36:00
13行的變數超過long的範圍了 改成unsigned long
作者: jerryh001   2018-10-17 20:51:00
如果你是要查變數範圍 可以用climits函式庫確認

Links booklink

Contact Us: admin [ a t ] ucptt.com