I want to load a string resource when app is started. So I initialize a global variable like this

CString g_strMyStr((LPCSTR)IDS_MYSTR); // IDS_MYSTR is a string resource ID

But when starting debugging the codes, I will always get "Debug Assertion Failed!" error.

How to solve this problem?