const與static歸納總結

static與const都是C語言中的關鍵字,他們都可以修飾變量,函數等。 1.const   const與 變量     int  x = 5; // 變量    const int  x = 5;//在c++中,x是常量,在c語言中,x是不可改變的變量    const與指針類型 [objc]  view plain  copy   int a = 10;   int b = 20;   in
相關文章
相關標籤/搜索