SFML community forums

Help => General => Topic started by: Mars_999 on March 30, 2012, 11:34:11 pm

Title: error C2228: left of '.launch' must have class/struct/union
Post by: Mars_999 on March 30, 2012, 11:34:11 pm
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();
}

Title: Re: error C2228: left of '.launch' must have class/struct/union
Post by: Nexus on March 31, 2012, 12:12:14 am
These are function declarations, see Most vexing parse (http://en.wikipedia.org/wiki/Most_vexing_parse).
Title: Re: error C2228: left of '.launch' must have class/struct/union
Post by: Mars_999 on March 31, 2012, 03:27:09 am
Thanks that was it!!!