#ifndef _C_CAST_H
#define _C_CAST_H

struct bad_cast { };

void * __dynamic_cast(const char * t1, const char * t2, void * ptr) {
   if(strcmp(t1, t2) == 0) {
      return ptr;
   }
   else {
      bad_cast bc;
      throw bc;
   }
   return 0;
}


#endif /* _C_CAST_H */
