OO Programming Design question: Global Object part II
<p>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:</p>

<p>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.</p>

<p>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:</p>

<pre><code> classTCP TCPSocket;

 class classA
 {
 private:
 public:
 classA();
 virtual void method1();
 ...

 };

class classB
{
 private:
 public:
 classB();
 virtual void method1();
  ...

};
</code></pre>

<p>and so on for classC and classD...</p>

<p>Unfortunately, when declaring it like this my Symbian GCC-E compiler gives me the 
following error message</p>

<p>elf2e32 : Error: E1027: ELF File contains initialized writable data.</p>

<p>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.</p>

<p>Many thanks! </p>
