Guest User

C++ Error

a guest
May 28th, 2016
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. main.cpp:
  2.  
  3. Card* CreatedCard=new Card();
  4. Attack SendedSkill;
  5. SendedSkill.SetAttachedCard(CreatedCard);
  6. CreatedCard->AddSkill(&SendedSkill);
  7.  
  8. CardSkill.h:
  9.  
  10. void SetAttachedCard(Card* val) { AttachedCard=val; }
  11.  
  12. Error:
  13.  
  14. |In function 'int main()':|
  15. |23|error: no matching function for call to 'Attack::SetAttachedCard(Card*&)'|
  16. |23|note: candidate is:|
  17. include\CardSkill.h|24|note: void CardSkill::SetAttachedCard(CardSkill::Card*)|
  18. include\CardSkill.h|24|note:   no known conversion for argument 1 from 'Card*' to 'CardSkill::Card*'|
Advertisement
Add Comment
Please, Sign In to add comment