作者ilovemilk (呼啦啦..)
看板MacDev
标题爬文还是不行
时间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
1F:推 Blueshiva:gcc -o test ~/Desktop/test.c 10/25 12:08