Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML Game Development book problem ( chapter 3 )  (Read 6933 times)

0 Members and 1 Guest are viewing this topic.

MaxdeoxiS

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: SFML Game Development book problem ( chapter 3 )
« Reply #15 on: August 23, 2014, 01:26:27 pm »
It works! Thanks a lot man :D

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: SFML Game Development book problem ( chapter 3 )
« Reply #16 on: August 23, 2014, 01:44:08 pm »
Then I guess you have messed up your includes  ::)

You have to include the *.inl at the bottom (after the class declaration) of the hpp. And do not include the *.hpp in the *.inl




AlexAUT

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML Game Development book problem ( chapter 3 )
« Reply #17 on: August 23, 2014, 09:03:16 pm »
Since ResourceHolder is not a class, but a class template, the whole definition (including member function definitions) has to be available in the header file. Don't use a .cpp file. A typical way to separate header and implementation for templates is to provide a .hpp file as usual, and include the implementation at the end, in the form of a .inl file.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: