I have a teplated function prototype in a header file, and the function definition in the source file.
Code:Header file template<class T> int ErrorBox(const T& msg, HWND hWnd = HWND_DESKTOP);Including the header file, and linking to the source file... whenever I try to call this function from main I get a linker error. What am I doing wrong?Code:Source file template<class T> int ErrorBox(const T& msg, HWND hWnd/* = HWND_DESKTOP*/) { tstringstream ss; ss << msg; return MessageBox(hWnd, ss.str().c_str(), _T("Error!"), MB_OK | MB_ICONERROR); }



LinkBack URL
About LinkBacks



)