Re: 爬文還是不行
※ 引述《ilovemilk (呼啦啦..)》之銘言:
: 標題: 爬文還是不行
: 時間: Tue Oct 25 12:05:26 2005
:
: 幫朋友問
:
: #include <stdio.h>
: #include <stdlib>
: #include <time/h>
:
: int main()
: {
: srand( time( NULL ) );
: double test;
: test = rand();
: printf( "test = %f", test );
:
: return 0;
: }
:
: 我把上面這樣的指令存成 test.c 在桌面
: 要如何用終端機來讓他執行呢
:
: 用 gcc -o test ~/desktop/test.c 也不行
:
: 請問有方法嗎 謝謝
:
: --
: ※ 發信站: 批踢踢實業坊(ptt.cc)
: ◆ From: 140.112.4.247
: 推 Blueshiva:gcc -o test ~/Desktop/test.c 10/25 12:08
照用了
/Desktop/test.c:2:18: error: stdlib: No such file or directory
/Desktop/test.c:3:18: error: time/h: No such file or directory
出現這樣的錯誤訊息
是因為抓不到函式庫嗎
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.52.186
推
10/25 14:55, , 1F
10/25 14:55, 1F
推
10/25 15:00, , 2F
10/25 15:00, 2F
→
10/25 15:01, , 3F
10/25 15:01, 3F
推
10/25 15:14, , 4F
10/25 15:14, 4F
推
10/26 00:54, , 5F
10/26 00:54, 5F
討論串 (同標題文章)