分配大小无效:4294967295 字节
Invalid allocation size: 4294967295 bytes
我正在尝试构建我的第一个C++应用程序,并且正在尝试浏览表格。但是,调试器会显示此错误消息。
DWORD *dwWatch = new DWORD[taille]; // <-- The error appears here.
for (LISTSTR::iterator i = listMe.begin(); i != listMe.end(); ++i, j++)
{
dwWatch[j] = m_DirWatcher.WatchDirectory(m_strDirectoryToMonitor, dwChangeFilter, pHandler, true, NULL, NULL);
}
请问我该如何解决这个问题?
taille 的实际值是 -1,因为无符号 int 的 4294967295 和有符号 int 的 -1 都在内存中0xffffffff。
因此,请查看其值何时更改为 -1。请注意,某些标准函数在失败时返回 -1。
相关文章:
- 从不同线程使用int64的不同字节安全吗
- 将Integer转换为4字节的unsined字符矢量(按大端字节顺序)
- 在UNIX系统中使用DIR查找文件的字节大小
- 如何使用Crypto++并为RSA返回可打印的字节/字符数组
- std::当在256字节边界上写入整数时,流的奇怪行为
- 当比特(而不是字节)的顺序至关重要时的持久性
- 从文件中读取多个字节,并将它们存储在C++中进行比较
- 如何在文件中查找字节序列
- luaL_dofile在已知良好的字节码上失败,可以使用未编译的版本
- 字节到位运算符重载C++
- 在java中读取c++字节的位字段
- 使用 std::vector::reverse_iterator 将 int 序列化为字节向量?
- 字节真的是最小可寻址单元吗
- struct.error:解压缩 C++ 结构时,解包需要 288 字节的缓冲区
- 读取文件中所有可能的十六进制 16 字节序列并打印每个序列
- 如何使用 OpenCV 解码在两个 UWP 应用之间发送的图像字节?
- 如何将字节数组元素替换为修改的十六进制 ASCII 符号?
- asn1c 不会从 asn.1 模块中提取八位字节字符串的默认值
- 分配大小无效:4294967295 字节
- 无效的分配大小:4294967295字节