- #include "stdafx.h"
- #include <iostream>
- #include <cassert>
- using namespace std;
- void PrintMsg(const char* pszMsg);
- int _tmain(int argc, _TCHAR* argv[])
- {
- char* szMsg = NULL;
- PrintMsg(szMsg);
- return 0;
- }
- void PrintMsg(const char* pszMsg)
- {
- assert(pszMsg);
- cout << pszMsg << endl;
- }
c++标准库中的assert
最新推荐文章于 2025-08-22 12:09:46 发布