港股即時

Economic Calendar

Saturday, October 22, 2016

C++ Learning


C和 C++的分別

http://blog.xuite.net/edison901/documents/3753230-C+%E5%92%8C+C%2B%2B+%E7%9A%84%E5%B7%AE%E5%88%A5+--+%E4%B8%80%E4%BA%9B%E6%B7%BA%E8%A6%8B

程式設計的思維模式:
1. procedural-based paradigm
2. object-based paradigm
3. object-oriented paradigm
4. generic paradigm


C++入門指南
http://pydoing.blogspot.hk/2014/06/cpp-guide.html

中英文術語對照
文字編輯器text editor
整合開發環境Integrated Development Environment, IDE
關鍵字keyword
保留字reserved word
基本內建型態primitive built-in type
整數integer
宣告declare
參數列parameter list
回傳值return value
字串字面常數string literal
註解comment
標準程式庫standard library
前置處理器preprocessor
標頭檔header file
識別字identifier
變數variable
函數function
參數parameter
字面常數literal
運算子operator
類別class
物件object
輸出運算子output operator
命名空間name space
作用域運算子scope operator
建構子constructor
陳述statement

基本內建型態與物件


C++ 中的基本內建型態 (primitive built-in type) 屬於算術型態 (arithmetic type) ,分成四大類


基本資料型態共有九種,如下表:

型態類型關鍵字範圍
布林booltruefalse
字元char1 位元組
寬字元wchar_t2 位元組
整數short2 位元組
整數int4 位元組
整數long4 位元組
浮點數float4 位元組
浮點數double8 位元組
浮點數long double12 or 16 位元組

No comments:

Post a Comment