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

write a c++ program to create an object of a class called employee containing the employee code name designation basic salarry HRA Da gross salary as data 10 such objects "members process "

1 Answers  


How is stl different from c++ standard library?

0 Answers  


why we are using the fork command?.. how it works?

1 Answers  


a program using one dimensional array that searches a number if it is found on the list of given input numbers given by the user and locate its exact location in the list.

0 Answers  


what is use of for loop?

9 Answers   Wipro,






what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?

2 Answers  


5. Write c++ function that would intake a string and return the number of occurrences of a given character in that sring Ex:- if the word is “Colombo” and count the occurrences of the letter “o” the function would return 3

1 Answers  


What is 2*2?

7 Answers  


Describe the elements of Microsoft Word screen. Write down steps for creating, saving, retrieving, editing and printing a document.

2 Answers  


Write a program to print the swapping in two no and using three variable.

5 Answers   Broadridge,


write a program to demonstrate,how constructor and deconstructor work under multilevel inheritance

3 Answers   TCS,


how to overload << and >> operator in c++

3 Answers   Wipro,


Categories