Reputation: 1
Am trying to build a c++ solution consisting of 3 vc project files. where in which am am using my own stl library and standard stl collections[lists, vectors.. etc] prefixed with proper namespace.
for one particular variable[vector of user defined type]. which is the element of some userdefined structure it is giving an error as:
error C2039: '_Mycont' : is not a member of 'std::_Vector_const_iterator<_Ty,_Alloc>' C:\Program Files\Microsoft Visual Studio 8\VC\include\vector 195
error C2039: '_Mycont' : is not a member of 'std::_Vector_const_iterator<_Ty,_Alloc>' C:\Program Files\Microsoft Visual Studio 8\VC\include\vector 195
error C2039: '_Mycont' : is not a member of 'std::_Vector_const_iterator<_Ty,_Alloc>' C:\Program Files\Microsoft Visual Studio 8\VC\include\vector 195
and that line of code is
std::vector<ACand> Cands;
for the above variable am trying to perform minimal operations like insert and delete.
It works properly in debug mode. unable to do the same in release mode.
Anyone can help me out in resolving the errors.
Thanks Radha
Upvotes: 0
Views: 229
Reputation: 178
You should never try to create your own stl containers. The ones provided by your compiler's implementation are way better than anything you might achieve. But if you still want to do this, prefix them with the proper namespace (like mystd or something). My guess is that somehow on release, your program is trying to use std::vector instead of mystd::vector, so it complains because std::vector does not contain any _Mycont member.
Upvotes: 1