主題: Dev-C++問題
瀏覽單個文章
lamand
Amateur Member
 

加入日期: Aug 2005
文章: 39
首先感謝大大建議..但是好像真正的癥結另有攜竅
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include<stdio.h>
#include<math.h>
#include<conio.h>
#define randomize() srand((unsigned)time(NULL))
#define GLUT_DISABLE_ATEXIT_HACK
#include <GL/glut.h>
void srand(unsigned seed);
int main(int argc, char *argv[])
{
int i;
time_t t;
srand((unsigned)time(&t));
for(i=1;i<=5;i++)
{
printf("%-5d",rand());
printf("%8d",srand(time(0)));<----大大說的是的確望了一個")"
}
system("PAUSE");
return 0;
}
錯誤訊息如下
C:\Dev-Cpp\123.c In function `main':
19 C:\Dev-Cpp\123.c invalid use of void expression
C:\Dev-Cpp\Makefile.win [Build Error] [123.o] Error 1
舊 2007-09-04, 08:21 PM #3
回應時引用此文章
lamand離線中