Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Chapter 05] KamaKazi Base code
#10
Okay, moving to the next step with The Ship / Shooter, the code listed in the book does not compile.

The constructor for Shooter with the GameObject base class initialization list will not compile if placed in the Header file as is shown on page 129. This needs to be moved to .cpp file instead.

Thus in the Shooter.h should just have:
Shooter(char* filename, MyFiles* filehandler);

and Shooter.cpp file , the constructor should look like:

Shooter::Shooter(char* filename, MyFiles* filehandler) : GameObject (filename, filehandler)
{
}

Otherwise, I get a compiler redefinition error for Shooter::Shooter.

Also, at the bottom of page 129, it states " ... let's get our init systems to create our ship and try moving him around a bit.". However, on the next page the book jumps to "Da Baddies!". Is it assumed the reader will understand what to do next?
Reply


Messages In This Thread
[Chapter 05] KamaKazi Base code - by jomoengineer - 11-13-2018, 07:57 AM
RE: [Chapter 05] KamaKazi Base code - by jomoengineer - 11-19-2018, 05:33 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)