Hi
Sorry for reposting this, but for some reason I can not add comments to my older post. Some people wanted to know the exact error message I get when trying to do the following:
I have probably a quite simple problem but I did not find a proper design decision yet. Basically, I have 4 different inherited classes and each of those classes has more than 10 methods.
Each of those classes should make use of the same TCP Socket; this object keeps a socket open to the server throughout program execution. My idea was to have the TCP obejct declared as "global" so that all other classes can use it:
classTCP TCPSocket;
class classA
{
private:
public:
classA();
virtual void method1();
...
};
class classB
{
private:
public:
classB();
virtual void method1();
...
};
and so on for classC and classD...
Unfortunately, when declaring it like this my Symbian GCC-E compiler gives me the following error message
elf2e32 : Error: E1027: ELF File contains initialized writable data.
So I am wondering if there is any other way I could declare this TCP object so that it is available for ALL the other classes and its methods? classA() is the first method that will be called when initialising this subsystem.
Many thanks!