I've a quite a few functions in my project. so made a header file
and my main.c file looks like this..Code:#ifndef _check_H #define _check_H int BruteForceAlgo (void) int check (int i, int j, int n); int check_row (int i, int j, int n); int check_column (int i, int j, int n); int check_box_9x9 (int i, int j, int n); int check_box_6x6 (int i, int j, int n); int output (void); #endif //_check_H
I've even specified # include "check.h" in function all function files...Code:# include <stdio.h> # include "check.h" # define size 9 //array size # define nmax 10 // max number in array [ 10 for 9x9, 7 for 6x6 ] //global declaration extern int sudoku[size][size]; extern int TempArr[size][size]; extern int I, J, N; extern int dyN; int main(void) { int i,j; // Input printf("Enter Sudoku\n"); for (i=0; i<size; i++) { for (j=0; j<size; j++) { scanf("%d",&sudoku[i][j]); //copy to TempArr TempArr[i][j] = sudoku[i][j]; ...............
- As I require scope of some identifiers in other function files, I mentioned extern
This problem is I'm getting the following errors:
Atleast I had idea about 'storage class' errors but I couldn't understand the last two errors..PHP Code:storage class specified for parameter `sudoku'
storage class specified for parameter `TempArr'
storage class specified for parameter `I'
storage class specified for parameter `J'
storage class specified for parameter `N'
storage class specified for parameter `dyN'
syntax error before '{' token
[Build Error] [main.o] Error 1
I don't know why "syntax error before '{' token " is coming ...
help me.
I'm currently using Windows XP with Dev-C++ IDE



LinkBack URL
About LinkBacks


