Build errors

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Build errors

Post by chili » January 31st, 2017, 6:22 am

Chili

User avatar
Yumtard
Posts: 575
Joined: January 19th, 2017, 10:28 pm
Location: Idiot from northern Europe

Re: Build errors

Post by Yumtard » January 31st, 2017, 6:35 am

chili wrote:It was a pretty easy solve :)

https://github.com/Yumtard/Spaceballs/pull/2/files
wow awesome! Thanks
Seems like my code for bullets hitting mines are just working sometimes so back to the drawing board on that one :D

So when do I want to include in the cpp file rather than in the h file? And what does "class" in the parameters do? is that the forward decleration?

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Build errors

Post by chili » January 31st, 2017, 6:38 am

Basically, yeah that's what you do. Remember the T18 video you said wasn't so important, well it explains the problem of circular dependency and how it relates to the preprocessor. I suggest you revisit it sometime and take a closer look, the info will help you in understanding and fixing these problems. ;)

And yes, the "class" is the forward declaration part that tells the compiler "Hey there's this class called Ship. Trust me. I'll tell you all about it later." :D
Chili

User avatar
Yumtard
Posts: 575
Joined: January 19th, 2017, 10:28 pm
Location: Idiot from northern Europe

Re: Build errors

Post by Yumtard » January 31st, 2017, 6:42 am

Haha alright :) Guess I'll have to give tut a rewatch!

Post Reply