c++ - C++:错误:无法在 stl_list.h 创建变量对象
问题描述
我有这个:
我的包括
#include<iostream>
#include <list>
#include <fstream>
#include <vector>
#include <sstream>
using namespace std;
崩溃的地方:
for (i = 0; i < j; i++){
Actual = SPLITaVecINT(txtvec[i+1]);
max = Actual.size();
if (max != 1) {
for (k = 0; k < porte; k++) {
Grf.addEdge(Actual[0], Actual[k+1]); //**HERE IT CRASHES**
}
}
}
Grf.bridge();
addEdge 在这里,它使用双链表。
void Graph::addEdge(int v, int w)
{
adj[v].push_back(w);
adj[w].push_back(v); // Note: the graph is undirected
}
因此,在 CLion 中进行调试时,它会转到第 1799 行的 stl_lib.h,在它旁边说“__position:0 __args#0:var-create:无法创建 var 对象”,同时突出显示第 1801 行。
看不到我的代码中的错误在哪里。请帮忙。
解决方案
推荐阅读
- css - React-transition-group 过渡不会在退出时触发动画
- android - 在后台加载 tabLayout 片段
- android - 如何始终扫描 ble 设备
- swift - Swift 的 Set 中索引的时代
- python - 通过映射或掩码根据字典更改熊猫数据帧值
- java - Swagger UI 抱怨 ServerHttpRequest
- python-3.x - 每次在 PyQt5 中单击按钮时都会发生不同的事件
- python - python - 我希望多个线程产生多个进程,所有进程都应该并行运行
- gitlab-ci - 在 GitLab CI 中,有没有办法在合并请求中定义管道变量?
- android - Android Studio - 如何关闭“单词'word'中的错字?