Click here to Skip to main content
16,020,249 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
MIDL
int ParseTable[50][50];
ParseTable[0][7]=1;
ParseTable[1][7]=3;
ParseTable[1][33]=3;
ParseTable[2][12]=4;
ParseTable[3][7]=5;
ParseTable[3][12]=6;
ParseTable[4][7]=7;
ParseTable[5][10]=8;
ParseTable[6][9]=9;
ParseTable[6][20]=10;


This is a code in a file parser.h
the compiler shows error:
VB
parser.h:54: warning: data definition has no type or storage class
parser.h:54: error: conflicting types for ‘ParseTable’
parser.h:52: note: previous declaration of ‘ParseTable’ was here
parser.h:54: error: invalid initializer
parser.h:55: warning: data definition has no type or storage class
parser.h:55: error: conflicting types for ‘ParseTable’
parser.h:52: note: previous declaration of ‘ParseTable’ was here
parser.h:55: error: invalid initializer
parser.h:56: warning: data definition has no type or storage class
parser.h:56: error: conflicting types for ‘ParseTable’
parser.h:52: note: previous declaration of ‘ParseTable’ was here
parser.h:56: error: invalid initializer
parser.h:57: warning: data definition has no type or storage class
parser.h:57: error: conflicting types for ‘ParseTable’
parser.h:52: note: previous declaration of ‘ParseTable’ was here
parser.h:57: error: invalid initializer
Posted
Comments
Sergey Alexandrovich Kryukov 8-Feb-11 13:59pm    
You don't show code with the errors and warnings! What can you expect? Did you see this code yourself? The error/warning messages are straightforward.
--SA

1 solution

You need to move those initializations into an actual function body.
 
Share this answer
 
Comments
abhi5306 8-Feb-11 14:15pm    
thnx sir!
Nish Nishant 8-Feb-11 14:18pm    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900