atoi()函數(char類型字符串轉int)

int atoi(const char *str) 描述 C 庫函數 int atoi(const char *str) 把參數 str 所指向的字符串轉換爲一個整數(類型爲 int 型)。html 參數 str -- 要轉換爲整數的字符串。函數 返回值 成功時,該函數返回轉換後的整數做爲int值。 若是轉換後的值超出a的可表示值範圍int,則會致使未定義的行爲。若沒法進行轉換,則返回 0。spa
相關文章
相關標籤/搜索