D
Dew
Hi all,
I needed a clue to get rid of this problem. Code work fine for few run
but then fail with some segmentation fault error with next subsequent
run. I am using Visual Age C++ under AIX compiler , version 5
1 //******************************************************************8
2 //1. some other stuff goes here
3 //2. some other stuff goes here
4 //3. some other stuff goes here
5 // Now here is the Map initializaiton steps ..............
6 map<IString,IString> myMap ;
7 if (myMap.find((IString)name) != myMap.end()) // if Header Exist in
Map Table
8 {
9 IString s1;
10 for ( map< IString, IString >::const_iterator im = myMap.begin();
im != myMap.end(); ++im )
11 if (im->first==name) s1=(IString)im->second ;
12 }
13 else
14 myMap[(IString)name]=(IString)value;
//******************************************************************
Here value and name is type of const char*
for the first few run Map is being initialize properly but suddenly
some memory corruption error shown & it's stuck at line 4 only. any
suggestion or clue on this please ?
I needed a clue to get rid of this problem. Code work fine for few run
but then fail with some segmentation fault error with next subsequent
run. I am using Visual Age C++ under AIX compiler , version 5
1 //******************************************************************8
2 //1. some other stuff goes here
3 //2. some other stuff goes here
4 //3. some other stuff goes here
5 // Now here is the Map initializaiton steps ..............
6 map<IString,IString> myMap ;
7 if (myMap.find((IString)name) != myMap.end()) // if Header Exist in
Map Table
8 {
9 IString s1;
10 for ( map< IString, IString >::const_iterator im = myMap.begin();
im != myMap.end(); ++im )
11 if (im->first==name) s1=(IString)im->second ;
12 }
13 else
14 myMap[(IString)name]=(IString)value;
//******************************************************************
Here value and name is type of const char*
for the first few run Map is being initialize properly but suddenly
some memory corruption error shown & it's stuck at line 4 only. any
suggestion or clue on this please ?