title: C++ subclasses modular functions
body: <p>Sorry, I decided to radically update the question given the code was riddled with my errors and didn't convey my point.</p>
  
  <p>I wanted to see whether or not the below is viable:</p>
  
  <p>Here's an example that can be compiled:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  class TestA
  {
      public:
          int A;
  
          TestA(){A = 1;}
          const TestA &amp;operator=(const TestA &amp;Copy)
          {
              A = Copy.A;
          }
  };
  
  class TestB : public TestA
  {
      public:
          using TestA::operator=;
          void AdvancedFunction1(){A = A + A;}
  };
  
  
  
  int main()
  {
      TestA Test;
      TestB *Alt;
      TestB Alt2;
  
      Alt = (TestB *)&amp;Test;
  
      printf("%d!\n",Test.A);
      Alt-&gt;AdvancedFunction1();
  
      printf("%d!\n",Test.A);
  
      Test = Alt2;
  
      printf("%d!\n",Test.A);
  
      return 0;
  }
  </code></pre>
  
  <p>Given, that TestB can (with casting) point to TestA, and can successfully modify TestA, is this a viable concept? It seems to work so, what are the pitfalls? (I know people say it's wrong but what is it that is <em>specifically</em> wrong with it aside from 'convention'?).</p>