Guest User

Untitled

a guest
Oct 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. extern "C" {
  4.  
  5. typedef struct {
  6. int a;
  7. } Base;
  8.  
  9. typedef struct {
  10. int a;
  11. } Derived;
  12.  
  13. int Init(Base* b);
  14. }
  15.  
  16.  
  17. int main() {
  18. Derived d;
  19. Init(&d); // compile error: can not convert argument 1 from 'Derived *' to 'Base *'
  20. }
Add Comment
Please, Sign In to add comment