29

2015年6月30日 星期二

[C] vs2013 解決不能正常使用 scanf,strlen 等函數問題

›
R-click your project and click the properties option , do the same things with the illustration.
2015年6月7日 星期日

[C] %s 的使用

›
當使用 %s 於 printf 和 scanf 時,  對應的argument 必須是 char * , 如下列例子: char * str_constant = "I point to a string literal" ; char ...
2015年6月1日 星期一

[C] auto 與 register

›
C語言變數 儲存等級(storage class) ,一共有四種: auto、extern、register、static ,我們最常用的是 auto ,然而卻很少人用它來宣告變數,怎麼說起來很奇怪?因為 編譯器自動把我們宣告的變數自動設成auto ,只是我們都忽略有這回事。...

[C] static 與 extern

›
static 變數,當變數有宣告時加上static限定時,一但變數生成,它就會 一直存在記憶體之中 ,即使函式執行完畢,變數也不會消失,例如:  #include <stdio.h> void count ( void ); int main ...

[C] 可視範圍(scope)

›
在C中,談到可視範圍(scope)可分為許多層次,也可以談到很複雜,在這邊先談談 -「全域變數」(Global variable) -「區域變數」(Local variable) -「區塊變數」(Block variable)。  全域變數 是指直接宣告在(主)函式之外...

[C] 列舉(enum)

›
列舉型態(enumeration)是一種特殊的常數定義方式。 列舉型態可使我們定義自己的資料型態,及設定其值。 程式的可讀性提高。 列舉型態的定義及宣告方式格式如下: 定義1: enum color {   red,   blue,   ...

[C] Typedef

›
typedef 用來對一個資料類型取一個新名字。目的是為了讓程式碼更好讀更好理解 舉個例子:  我們來為int取個可愛的名字 這樣看起來比較順眼 未使用 typedef 的樣貌 int color; //宣告color 為一變數 int leaf; // 宣告...
‹
›
首頁
查看網路版

關於我自己

Unknown
檢視我的完整簡介
技術提供:Blogger.