At 01:38 PM 5/31/2001 -0400, Stephen A. Cochran wrote:
>Sorry if this would be better in the Tools forum...
>
>I'm writing a network application, and the network code was
>developed on Linux,
>compiles fine there.
>
>It's a client/server protocol, and most of the network code is
>encapsulated in
>the Server class. This class includes several other classes as
>private data,
>namely a TCPSocket class and a DirectoryServer class which also
>has a TCPSocket
>class. They are declared as follows in Server class declaration:
>
>TCPSocket curr_server;
>
>DirectoryServer dir_server;
>
>In Codewarrior, the Server class compiles fine, but when it gets
>to the
>DIrectoryServer class and the TCPSocket class code, I get a
>declaration syntax
>error back in the Server class declaration. It's like the class
>header files
>were accepted, but when it got to the code of the classes, it
>decided we didn't
>declare them correctly. Neither class takes an params for the
>constructors.
>
>Is there anything wierd about Palm and C++ classes, or am I just
>being stupid
>and missing something obvious...It's been a while since I used C++.
The most important thing to remember is that when different C++
compilers give you different results on the same code, it's an
abstruse problem, and no one will be able to diagnose it without
seeing actual code -- or a distillation of actual code, that
still manifests the problem.
From your description, I assume you have classes like this:
class Server {
class TCPSocket {
// ...
};
class DirectoryServer {
class TCPSocket {
// ...
};
};
// ...
};
I guess the use of inner and outer TCPSocket classes is legal,
but it's unusual, and gets into areas governed by some rather
obscure C++ rules. Which I don't remember at the moment; but I
*would* like to see the code that the compiler doesn't like...
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/