Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

erase in c++

// Non Empty map example
// CPP program to illustrate
// Implementation of empty() function
#include <iostream>
#include <map>
using namespace std;
  
int main()
{
    map<char, int> mymap;
    mymap['a'] = 1;
    mymap['b'] = 2;
    if (mymap.empty()) {
        cout << "True";
    }
    else {
        cout << "False";
    }
    return 0;
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #erase
ADD COMMENT
Topic
Name
3+6 =