Hi all,
Had a program that worked and compiled correctly and have since added the following function.
int point()
{
FILE *pp;
int findpoint=0, linepoint=1;
char pointstemp[256];
char pointsfilename[25];
char pointsword[25];
printf("Please enter file name: ");
scanf("%s", pointsfilename);
printf("Please enter word: ");
scanf("%s", pointsword);
if ((pp = fopen(pointsfilename, "r")) == NULL)
return(-1);
while( fgets(pointstemp, 256, pp) != NULL)
{
if ((strstr(pointstemp, pointsword)) !=NULL)
{
printf("Points are %d", linepoint);
printf("%s", pointstemp);
findpoint++;
}
linepoint++;
}
if (findpoint == 0)
{
printf("\nNo match found.\n");
}
menu();
return 0;
}
The program complies with no errors or warnings (using Microsoft Visual Studio) but when i try to build the program the following errors occur!
Linking...
8.obj : error LNK2001: unresolved external symbol _points
Debug/8.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
8.exe - 2 error(s), 0 warning(s)
Does anybody have any ideas why this is?
Many thanks in advance.