I have the following code:
std::vector<EMEventContainer>::iterator it=pevent.begin();
try{
while(it != pevent.end()) {
RepDataManager::Log(RepDataManager::HIDEBUG, " Processing next");
EMEventContainer curr = *it;
......
.....
.....
...
it++;
RepDataManager::Log(RepDataManager::HIDEBUG , " About to process next element");
}
This function succeeds in debug builds but results in abnormal crashes in release build .I am using VC++ .NET 7.0
How can i avoid this crash?I have read abotu checked iterators but do not know how to work around this crash.I have tried #define _SECURE_SCL 0 but to no avail.
std::vector<EMEventContainer>::iterator it=pevent.begin();
try{
while(it != pevent.end()) {
RepDataManager::Log(RepDataManager::HIDEBUG, " Processing next");
EMEventContainer curr = *it;
......
.....
.....
...
it++;
RepDataManager::Log(RepDataManager::HIDEBUG , " About to process next element");
}
This function succeeds in debug builds but results in abnormal crashes in release build .I am using VC++ .NET 7.0
How can i avoid this crash?I have read abotu checked iterators but do not know how to work around this crash.I have tried #define _SECURE_SCL 0 but to no avail.