title: Single Pointer pointing to two different struct tables
body: <p>I have already read the article below, but I still have the same question.....</p>
  
  <p>If I have a void pointer that I cast at the runtime to one or to other structures, what seems to be the problem here ? For example a pseudo code like below</p>
  
  <pre><code>typedef struct A {
  
     int x;
     int y;
  
  } A1;
  
  typedef struct B {
  
    int x;
    int y;
  
  } B1;
  
  
  .......
  
  A1 *a1;
  B1 *b1;
  void *prt;
  
  a1 = new A1;
  b1 = new B1;
  
  prt = reinterpret_cast&lt;A1&gt;(a1); // ptr shows to a1 structure ?
  prt = reinterpret_cast&lt;B1&gt;(b1); // ptr shows to b1 structure ?
  </code></pre>
  
  <p>Will ptr points to a1 and b1 structures ?</p>
  
  <p>[<a href="https://stackoverflow.com/questions/8470528/single-pointer-pointing-to-two-different-const-struct-tablelook-up-tables-in-c]">Single Pointer pointing to two different const struct table(look up tables) in c</a></p>