由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - a strange issue
相关主题
C++一个string的小问题compile error
sizeof(string)这段C++代码有啥问题
a string define question (c++)问一个C++ set和unordered_set iterator的问题
一个C++ operator new的重载问题effective C++里的memory pool 一问:
内存管理的问题why do we still use dynamic allocation?
make 时候遇到 undefined reference 怎么办?为什么用try catch不住exception?
typedef basic_string string;关于内存泄漏
一个c++小问题alloc这个函数究竟做些啥活呢?
相关话题的讨论汇总
话题: string话题: std话题: test话题: existing话题: structure
进入Programming版参与讨论
1 (共1页)
c*******9
发帖数: 6411
1
I have the following existing structure:
in a header file header.h
struct test
{
test();
string a;
...
std::map b;
...
}
the existing code impl.cxx use this structure and work ok, now I modify
the structure as following in the header.h
struct test
{
test();
string a;
string a2;
...
std::map b;
...
}
and it crash now in impl.cxx in the existing code:
test test1;
..
test1.a2 = d; (crash here)
...
EXCEPTION_ACCESS_VIOLATION:
xtree\std::_Tree,std::
allocator >,0> >::insert Line 631
any ideas?
thanks!
S*********g
发帖数: 5298
2
problem is in the ... parts

【在 c*******9 的大作中提到】
: I have the following existing structure:
: in a header file header.h
: struct test
: {
: test();
: string a;
: ...
: std::map b;
: ...
: }

1 (共1页)
进入Programming版参与讨论
相关主题
alloc这个函数究竟做些啥活呢?内存管理的问题
array allocation in cmake 时候遇到 undefined reference 怎么办?
"brk()" 和 mmap() 有什么区别? (转载)typedef basic_string string;
菜鸟请教C问题一个c++小问题
C++一个string的小问题compile error
sizeof(string)这段C++代码有啥问题
a string define question (c++)问一个C++ set和unordered_set iterator的问题
一个C++ operator new的重载问题effective C++里的memory pool 一问:
相关话题的讨论汇总
话题: string话题: std话题: test话题: existing话题: structure