PDA

Click to See Complete Forum and Search --> : C Help


Azz00
Dec 27th, 2001, 09:55 PM
ompiling...
gtest.c
c:\windows\desktop\new folder\dppv.h(151) : error C2065: 'dp_MAXPLAYERS' : undeclared identifier
c:\windows\desktop\new folder\dppv.h(151) : error C2057: expected constant expression
c:\windows\desktop\new folder\dppv.h(152) : error C2229: struct '__unnamed' has an illegal zero-sized array
c:\windows\desktop\new folder\dppv.h(153) : error C2057: expected constant expression
c:\windows\desktop\new folder\dppv.h(154) : error C2229: struct '__unnamed' has an illegal zero-sized array
c:\windows\desktop\new folder\dp.h(409) : error C2057: expected constant expression
c:\windows\desktop\new folder\dp.h(412) : error C2229: struct 'dp_s' has an illegal zero-sized array
c:\windows\desktop\new folder\dp.h(413) : error C2057: expected constant expression
c:\windows\desktop\new folder\dp.h(418) : error C2229: struct 'dp_s' has an illegal zero-sized array
c:\windows\desktop\new folder\anet.h(1447) : warning C4005: 'dp_PLAYERDATA_LEN_MAX' : macro redefinition
c:\windows\desktop\new folder\dppv.h(81) : see previous definition of 'dp_PLAYERDATA_LEN_MAX'
c:\windows\desktop\new folder\gtest.c(1852) : warning C4020: 'commScanAddr' : too many actual parameters
Error executing cl.exe.

gtest.obj - 9 error(s), 2 warning(s)

what do thoes errors mean and how can they be fixed ?

CornedBee
Dec 28th, 2001, 07:06 AM
c:\windows\desktop\new folder\dppv.h(151) : error C2065: 'dp_MAXPLAYERS' : undeclared identifier

the name doesn't exist. Typo? Forgot to include a header?

c:\windows\desktop\new folder\dppv.h(151) : error C2057: expected constant expression

Seems you're using a variable when declaring an array size:
int i = 2;
char ar[i];
This is illegal, array sizes need to be constants.

c:\windows\desktop\new folder\dppv.h(152) : error C2229: struct '__unnamed' has an illegal zero-sized array

A follow-up on the last error.

c:\windows\desktop\new folder\dppv.h(153) : error C2057: expected constant expression

Like (151)

c:\windows\desktop\new folder\dppv.h(154) : error C2229: struct '__unnamed' has an illegal zero-sized array

Like (152)

c:\windows\desktop\new folder\dp.h(409) : error C2057: expected constant expression

Again

c:\windows\desktop\new folder\dp.h(412) : error C2229: struct 'dp_s' has an illegal zero-sized array

And again.

c:\windows\desktop\new folder\dp.h(413) : error C2057: expected constant expression

again

c:\windows\desktop\new folder\dp.h(418) : error C2229: struct 'dp_s' has an illegal zero-sized array

again

c:\windows\desktop\new folder\anet.h(1447) : warning C4005: 'dp_PLAYERDATA_LEN_MAX' : macro redefinition

this has already been defined once. You get this error when you write:
#define MAXVALUE 23
#define MAXVALUE 23 // error - name already exists

c:\windows\desktop\new folder\dppv.h(81) : see previous definition of 'dp_PLAYERDATA_LEN_MAX'

This would be where it was defined first

c:\windows\desktop\new folder\gtest.c(1852) : warning C4020: 'commScanAddr' : too many actual parameters

You supply too many parameters to a function/macro.

Azz00
Dec 29th, 2001, 08:20 AM
Thanks man verry gratefull.
I do not know C/C++ at all but i think i can fix them now