Hello, I have recently started building the project in the book and I have made it to chapter 3. But I have a problem, I was presented with this error
sfmlapplication\aircraft.cpp(22): error C2027: use of undefined type 'ResourceHolder<Resource,Identifier>'
1> with
1> [
1> Resource=sf::Texture,
1> Identifier=Textures::ID
1> ]
So I go take a look at where the error is, the code looks like:
20 Aircraft::Aircraft(Type type, const TextureHolder& textures)
21 : mType(type)
22 , mSprite(textures.get(toTextureID(type)))
23 {
24 sf::FloatRect bounds = mSprite.getLocalBounds();
25 mSprite.setOrigin(bounds.width / 2.f, bounds.height /2.f);
26 }
It seems that there is a problem with
mSprite(textures.get(toTextureID(type)))
and when I hover over textures with the mouse it pops up with "Error: incomplete type is not allowed" I have no idea why this would be, because as far as I can tell, other than the statistic stuff, my code is Identical to the code that was e-mailed to me. Also I did not include the string helper files, are those even needed? They aren't mentioned in the book so I figured they were for the statistics. Can anyone please help? I can't find any problems.