And*_*man 0 c++ string winapi visual-studio
Visual Studio2015。我正在阅读《通过C \ C ++的Windows》一书,并尝试使用其代码示例。作者写道,字符串的“安全”功能具有_s后缀,并在StrSafe.h标头中声明。此标头将是包含列表中的最后一个。在我的代码中,我包含了以下标头:
#include <iostream>
#include <exception>
#include <string>
#include <Windows.h>
#include <strsafe.h>
Run Code Online (Sandbox Code Playgroud)
但是我有一个问题:
// IDE doesn't see the _tcscpy_s function
errno_t result = _tcscpy_s(szBuffer, _countof(szBuffer), TEXT("0123456789"));
Run Code Online (Sandbox Code Playgroud)
我看了有关的信息_tcscpy_s的功能,但我没有看到它的头文件(我希望它是信息strsafe.h)。
我该如何解决?
| 归档时间: |
|
| 查看次数: |
3212 次 |
| 最近记录: |