Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - DMC 8.31.2 error
The following code doesn't compile: -------------------------------------- #include <stdio.h> typedef unsigned char eth_address[6]; extern int set_addr (const eth_address *addr); int main (void) { return (0); } -------------------------------- Error is: test.c(3) : Error: type qualifiers and static can only appear in outermost array of function parameter What is this? This used to be no problem. Gisle V. # rm /bin/laden /bin/laden: Not found Dec 15 2002
In article <ati7lr$26qm$1 digitaldaemon.com>, Gisle Vanem says...The following code doesn't compile: -------------------------------------- #include <stdio.h> typedef unsigned char eth_address[6]; extern int set_addr (const eth_address *addr); int main (void) { return (0); } Dec 15 2002
"Richard" <fractal clark.net> wrote:In article <ati7lr$26qm$1 digitaldaemon.com>, Gisle Vanem says...The following code doesn't compile: -------------------------------------- #include <stdio.h> typedef unsigned char eth_address[6]; extern int set_addr (const eth_address *addr); int main (void) { return (0); } Dec 15 2002
In article <atijoo$2iam$1 digitaldaemon.com>, Gisle Vanem says...typedef unsigned char eth_address[6]; extern int set_addr (eth_address* const addr); Dec 15 2002
This approach might suit your needs as well, but you need to lose the typedef. extern int set_add(const unsigned char (*addr)[6]); int set_addr(const unsigned char (*addr)[6]) { const unsigned char *a = *addr; return 0; } void main() { unsigned char b[6] = "12345"; set_addr(&b); } Dec 15 2002
|