i have some problems with this code i keep getting the error C2601: local function definitions are illegal.what i do wrong??
Error error C1075: end of file found before the left brace '{' at ...69
Error 1 error C2601: 'SetField' : local function definitions are illegal 17
Error 2 error C2601: 'KillNieghbors' : local function definitions are illegal 31
Code:
#include<stdio.h>
#include<stdlib.h>
int col;
int row;
int i;
int count;
char Area[99][99];
int main()
{
void SetField()
{
do
{
printf("enter colmn");
scanf("%d",&col);
printf("enter row");
scanf("%d",&row);
printf("to exit enter colmn and row -999");
}
while((col!=-999)&&(row!=-999));
}
void KillNieghbors(int g,int c)
{
for(i=0;i<100;i++)
for(j=0;j<100;j++)
{
count=0;
while(int count<4)
{
count++;
}
if(count<3)
{
Killneighbor(i,j);
}
}
void PrintField()
{
for(i=0;i<100;i++)
for(j=0;j<100;j++)
{
printf("c%",&Aria[i][j]);
}
}
}
}
Error error C1075: end of file found before the left brace '{' at ...69
Error 1 error C2601: 'SetField' : local function definitions are illegal 17
Error 2 error C2601: 'KillNieghbors' : local function definitions are illegal 31
Comment