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

Author Topic: error C2228: left of '.launch' must have class/struct/union  (Read 4197 times)

0 Members and 1 Guest are viewing this topic.

Mars_999

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • Email
I am not sure why I am getting this... I can't figure it out been at it for a few hours... :(

SFML2.0
 MSVC++ 2010

using a functor

Code: [Select]
//global in .cpp file
sf::Thread threadLoadTextures(NX::ResourceLoadTextures());
sf::Thread threadLoadMusic(NX::ResourceLoadMusic());
sf::Thread threadLoadMaps(NX::ResourceLoadMaps());

void NX::ResourceManager::Init(void)
{
threadLoadTextures.launch();
threadLoadMusic.launch();
threadLoadMaps.launch();
}


Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6276
  • Thor Developer
    • View Profile
    • Bromeon
Re: error C2228: left of '.launch' must have class/struct/union
« Reply #1 on: March 31, 2012, 12:12:14 am »
These are function declarations, see Most vexing parse.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Mars_999

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • Email
Re: error C2228: left of '.launch' must have class/struct/union
« Reply #2 on: March 31, 2012, 03:27:09 am »
Thanks that was it!!!

 

anything