代码:struct s
{
CArray<int, int> a;
};struct s * x = (struct s *)malloc(sizeof(struct s));
x->a.RemoveAll();
-----------------------------------------------------------
dubug运行到x->a.RemoveAll()时, 弹出一个assert:Debug Assertion Failed!
File: afxtempl.h
Line: 307
For information on how your program can cause an assertion failure, see the Visual C__ documentation on asserts.
-----------------------------------------------------------
但运行release就没有任何问题, 程序结果也正确-----------------------------------------------------------
还有,我改成
struct s x;
x.a.RemoveAll();
dubug就没有assert
但我要用debug调试啊,请问如何解决?多谢!
{
CArray<int, int> a;
};struct s * x = (struct s *)malloc(sizeof(struct s));
x->a.RemoveAll();
-----------------------------------------------------------
dubug运行到x->a.RemoveAll()时, 弹出一个assert:Debug Assertion Failed!
File: afxtempl.h
Line: 307
For information on how your program can cause an assertion failure, see the Visual C__ documentation on asserts.
-----------------------------------------------------------
但运行release就没有任何问题, 程序结果也正确-----------------------------------------------------------
还有,我改成
struct s x;
x.a.RemoveAll();
dubug就没有assert
但我要用debug调试啊,请问如何解决?多谢!
解决方案 »
- 关于用ASKII码给文本文件加密的困惑,跪求答案!!!
- Dll中如何使用ActiveX控件?
- 请问如何才能得知用户是否设置密码(登陆操作系统时)
- FUck!!这样的JB公司,大爷不待了,什么破地方!一个月才那么点钱!还这也不行那也不行!!
- CFormView问题!
- 如何从确定字符集里面提取字符?
- 用VC自带的ProcessViewer Kill一个正在运行的程序时,被Kill的程序是否可以获得提示?
- 关于Editbox显示
- 求助x文件动画导入到程序里 模型依然是静止的
- 一本vc好书
- 小弟菜鸟,请问各位高手,我想创建同一个函数的多个线程,参数不同来运行,应该怎么实现啊
- 有哪位知道_tcstod()函数的用法和用途?
开辟的空间大小不正确吧建议用new(没问题)struct s * x = new s;
x->a.RemoveAll();
struct s * x = (struct s *)malloc(sizeof(struct s)*100);
要开100个struct
然后这样使用: x[20].a[1]用new怎么做到这样呢?