I'm trying to make a guess the number program, and I've come up with this:
Code:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
int b;
b=randomize(10);
printf("%d\n",b);
printf("Enter number: ");
scanf("%d", &a);
while (a != b)
{
printf("Wrong! Try again: ");
scanf("%d", &a);
}
printf("Congratulations! You guessed right!");
getchar();
getchar();
}
However, when I compile and I click the "linker" tab in the bottom of the screen I see the following messages:
Code:
d:\documents and settings\pim\mijn documenten\c\guessnum.o(.text+0x75):guessnum.c: undefined reference to `randomize'
I'm using the Bloodshed Dev C++ compiler, version 4.
Could anyone tell me what I have done wrong here?
Thank You.