[Linux] undefined reference to `itoa'

在linux寫了個簡單的C程序,裏面用到了itoa,可是編譯時提示「undefined reference to `itoa'」,本覺得加上-lc就好了,可結果仍是同樣。上網發現,有人說這個函數在linux中是不存在的,通常用sprintf來代替。看下面代碼及註釋吧:linux #include <stdio.h> #include <stdlib.h> //#include <unistd.h>
相關文章
相關標籤/搜索