我们原来做的程序的名字叫做“aa”(假设),现在想把工程的名字改为“bb””(假设),我们想了一种办法,但是会出现断言错误,下面是我们加入的代码
BOOL CAaaaaApp::InitApplication()
{
theApp.m_pszAppName = "askdjf";
return CWinApp::InitApplication();
}执行起来是没有问题,但是debug版本关闭的时候出现断言错误,怎么样解决啊。非常急
BOOL CAaaaaApp::InitApplication()
{
theApp.m_pszAppName = "askdjf";
return CWinApp::InitApplication();
}执行起来是没有问题,但是debug版本关闭的时候出现断言错误,怎么样解决啊。非常急
//The string is allocated before InitInstance is called.
free((void*)m_pszAppName);
//Change the name of the application file.
//The CWinApp destructor will free the memory.
m_pszAppName=_tcsdup(_T("d:\\somedir\\myapp.exe"));
m_pszAppName=_tcsdup(_T("路径"));