By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 816 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

[Error] 'ConvertTO25' undeclared (first use in this function) it shows this error in

P: 1
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>

int board[25];
const noughts=1;
const crosses=2;
const border=3;
const empty=0;
const int ConvertTo25[9]={
6,7,8,
11,12,13,
16,17,18

};

void InitialiseBoard(int *board){
int Index=0;
for(Index=0; Index<25;++Index){
board[Index]=border;
}
for(Index=0; Index<9; ++Index){
board[ConvertTO25[Index]]=empty;
}
}
void PrintBoard(const int *board){
int Index=0;
printf("\nboard:\n");
for(Index=0; Index<25;++Index){
if(Index!=0 && Index%5==0){
printf("\n");
}
printf("%4d",board[Index]);
}
printf("\n");
}
int main()
{
int board[25];

InitialiseBoard(&board[0]);

PrintBoard(&board[0]);
getch();
return 0;
}
Feb 4 '16 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 2,396
C is case-sensitive.
ConvertTO25 is not the same thing as ConvertTo25.
Feb 4 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.