Original Post
I usually don't post this sort of stuff (I usually don't post :D), but I really don't know how to start on this one... It most probably has to do with function overloading and me not at all understanding it. I have an overloaded inline function, like this: Don't mind the std::string stuff, it isn't meant to run fast, it's meant to run good, and it does. It worked as it should for a long time, until I realized I only used the int-version. So I try out the float-version, and *wham* link error: error LNK2001: unresolved external symbol "class std::basic_string,class std::allocator > __cdecl toStr(float)" (?toStr@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@M@Z ) The bodies are written, there are no libraries to include, and nothing of the first few google answers applies. I suspect something about inlines and overloading I didn't work out right... But please tell me. Thanks, -Amarth
inline std::string toStr(float x){
char buff[32];
sprintf(buff,"%g",x);
return buff;
}
inline std::string toStr(int x){
char buff[32];
sprintf(buff,"%i",x);
return buff;
}