關於"implicit declaration of function 'gettimeofday' is invalid in c99"的解決

當我們使用

 gettimeofday(&time, NULL);時,會出現這樣一個WARNING

 Implicit declaration of function 'gettimeofday' is invalid in C99

而經過搜索之後發現只需加入

#include <sys/time.h>

這個頭文件即可
發佈了21 篇原創文章 · 獲贊 4 · 訪問量 9萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章