Guest User

Untitled

a guest
Aug 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. Circular Dependencies / Incomplete Types
  2. #include "Spritesheet.h";
  3. class Stuffcollection {
  4. public:
  5. void myfunc (Spritesheet *spritesheet);
  6. void myfuncTwo ();
  7. };
  8.  
  9. void Stuffcollection::myfunc(Spritesheet *spritesheet) {
  10. unsigned int myvar = 5 * spritesheet->spritevar;
  11. }
  12. void myfunc2() {
  13. //
  14. }
  15.  
  16. #include "Stuffcollection.h"
  17. class Spritesheet {
  18. public:
  19. void init();
  20. };
  21.  
  22. void Spritesheet::init() {
  23. Stuffcollection stuffme;
  24. myvar = stuffme.myfuncTwo();
  25. }
  26.  
  27. #ifndef STUFFCOLLECTION_H_GUARD
  28. #define STUFFCOLLECTION_H_GUARD
  29. class Spritesheet;
  30. class Stuffcollection {
  31. public:
  32. void myfunc (Spritesheet *spritesheet);
  33. void myfuncTwo ();
  34. };
  35. #endif
  36.  
  37. #include "Stuffcollection.h"
  38. #include "Spritesheet.h"
  39.  
  40. void Stuffcollection::myfunc(Spritesheet *spritesheet) {
  41. unsigned int myvar = 5 * spritesheet->spritevar;
  42. }
  43.  
  44. void Stuffcollection::myfuncTwo() {
  45. //
  46. }
  47.  
  48. #ifndef SPRITESHEET_H_GUARD
  49. #define SPRITESHEET_H_GUARD
  50. class Spritesheet {
  51. public:
  52. void init();
  53. };
  54. #endif
  55.  
  56. #include "Stuffcollection.h"
  57. #include "Spritesheet.h"
  58.  
  59. void Spritesheet::init() {
  60. Stuffcollection stuffme;
  61. myvar = stuffme.myfuncTwo();
  62. }
Add Comment
Please, Sign In to add comment