看板 MacDev 關於我們 聯絡資訊
幫朋友問 #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