Is there any error below, its a code to delete all entires
from a map
#include <map>
#include iostream.h
int main()
{
int i =0;
map <int, char> TestMap;
while(i<3)
{
TesMap.insert(TestMap::value_type(i,Test));
i++;
}
typedef map<int, char> :: iterator mapIter =TestMap.begin();
if(mapIter!=TestMap.end())
{
TestMap.erase(mapItrer);
++mapIter;
}
return 0;
}




No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More STL Interview Questions

what is the difference between thread and process

1 Answers   Infosys,


Who created stl?

0 Answers  


what is a template?

2 Answers   Amazon, BITS, IBS, Wipro,


What is the STL?

2 Answers   Epson, HP,


differentiate between private, public and protected data members of the class using example.

1 Answers  






How Find, Replace and Go To commands ca be used to substitute one character string for another? Explain with the heIp of an example.

1 Answers  


what is an algorithm in terms of STL?

1 Answers   Lucent, Wipro,


write a program to convert a decimal number in to its equivalent binary number?

0 Answers  


I am doing my BS.c MATHS CAN I ABLE TO JOIN IN NIIT?

2 Answers  


Waht is inheritance

6 Answers  


Difference between Structure and Class in C++?

5 Answers   Caritor,


sir please send me bpcl previous question papers

0 Answers   BPCL Bharat Petroleum,


Categories