From: Greg Long (greg_at_maneuveringspeed.com)
Date: 2003-03-04 20:24:44
Looking at some online C tutorials, function prototypes seem pretty much like C++, so I have to ask the question: What am I doing here that CC65 does not like? C:\Program Files\vice\sort.c>cl65 -v ShellSort.c ShellSort.c(13): Error: Conflicting types for `rand' Line: int main() ShellSort.c(35): Error: Conflicting types for `rand' Line: unsigned int a=10; ------ #include <stdlib.h> #include <time.h> #include <conio.h> //function declaration, line 13 follows this line unsigned int rand(); //unsigned long r_seed = clock(); int main() { unsigned int size = 10000; unsigned int i = size; unsigned int* ra; ra = (unsigned int*) malloc(size*2); //generate random numbers while(i) { ra[i] = rand(); --i; } return 0; } unsigned int rand() { //this code to be replaced with a random number //generating algorithm unsigned int a=10; return a; } ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-03-04 20:26:23 CET