mongoDB c++ 更新插入数据时BSONObjBuilder对象在函数返回时出错

 BSONObjBuilder data;
data.append("Date",newtime);
data.append("OpenPrice",strOpenPrice);
data.append("HighPrice",HighPrice);
data.append("LowPrice",LowPrice);
data.append("ClosePrice",ClosePrice);
data.append("AvgPrice",strAvgPrice);
data.append("Amount",strAmount);
data.append("Hold",strHold);

BSONObjBuilder builder;
builder.append("$set",data.obj());
conn.update(ns,condition,builder.obj(),true,true);

函数里这段代码执行完以后当函数返回时报错:
Run-Time Check Failure #2 - Stack around the variable 'builder' was corrupted.
Run-Time Check Failure #2 - Stack around the variable 'data' was corrupted.


斯蒂芬大帝
浏览 1038回答 2
2回答

慕的地6264312

您好,您的堆栈被破坏了,重新弄一下就好了~~
打开App,查看更多内容
随时随地看视频慕课网APP