i have the following:


Code:
myfile=fopen("getlin.txt","r+");
char*compare=(char*)malloc(sizeof(char*)*20);
int*choice=(int*)malloc(sizeof(int*)*2);
scanf("%d",choice);
printf("\nWhat would you like to search for?");
scanf("%s",compare);
printf("%s\n",compare);
ReadCatalogue(myfile,*choice,*compare);    /*Call to function, ReadCatalogue, (this is were it segments)*/



void ReadCatalogue(FILE *myfile, int choose, char**compare)     /*The called function, ReadCatalogue*/
is anyone able to suggest a reason for this?

i know it has something to do with my arguments when calling ReadCatalogue cause i get this warning when compiling

warning: passing arg 3 of `ReadCatalogue' makes pointer from integer without a cast.

this wasnt covered in the lecture notes and i havent a clue what it means.

Also before you go and make fun at my stupid errors, remember i have been using C for less than 20 hours total.

Thanx for your help and please post before you die of laughter cause i need a solution.