摘要:
typedef的作用 重命名變量:typedef unsigned int Uint;//可以使用Uint代替unsigned int 定義新的數(shù)據(jù)類型 typedef struct Books{ char IBSN[20]; char author[30]; char name[40]; } Bo 閱讀全文
posted @ 2021-08-11 19:28
sunshineoier
閱讀(121)
評(píng)論(0)
推薦(0)
摘要:
引言 C語(yǔ)言沒有直接地提供對(duì)錯(cuò)誤的處理,但是在errno.h中提供了很多的錯(cuò)誤代碼 打印錯(cuò)誤 perror()可以打印出對(duì)應(yīng)的錯(cuò)誤信息 strerror()會(huì)返回一個(gè)指針,指向當(dāng)前errno值的文本表示形式 附: 對(duì)于文件流的錯(cuò)誤需要使用stderr ex perror("error message 閱讀全文
posted @ 2021-08-11 19:27
sunshineoier
閱讀(56)
評(píng)論(0)
推薦(0)
摘要:
自動(dòng)類型轉(zhuǎn)換:低到高 int → unsigned int →long → unsigned long → long long → unsigned long long → float → double → long double ps:int自動(dòng)轉(zhuǎn)換成double并不需要經(jīng)過(guò)中間的步驟,可以直接自 閱讀全文
posted @ 2021-08-11 19:10
sunshineoier
閱讀(54)
評(píng)論(0)
推薦(0)

浙公網(wǎng)安備 33010602011771號(hào)