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

How the STL's are implemented, What the difference between templates and STL?

1 Answers   Symphony,


Find the error in the following program struct point {struct point *next; int data; } x; main() {int...data; } x; main() {int i; for(x=p;x!=0;) x=x->next,x++; freelist(x); } freelist(x) {free(x); return }

1 Answers   Sun Microsystems,


what's the difference between function overloading and function overiding?

5 Answers  


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

2 Answers  


if x<>=z then statement end what is the cyclomatic complexity

5 Answers  






What are the different types of stl containers?

0 Answers  


How can you create a bulleted list, numbered list and an outline by using bullets and numbering command. Explain with the help of example.

0 Answers  


why & sign is used in copy constructor

4 Answers  


What two types of containers does the stl provide?

0 Answers  


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

0 Answers  


What is a list in c++ stl?

0 Answers  


What is stl stack?

0 Answers  


Categories