Horje
can map return a value to a variable in c++ Code Example
can map return a value to a variable in c++
#include <iostream>  
#include <map>  
using namespace std;  
int main(void) {  
   map<char, int> m = {  
            {'a', 100},  
            {'b', 200},  
            {'c', 300},  
            {'d', 400},  
            {'e', 500},  
            };  
              
    auto it = m.find('e');  
     
    if ( it == m.end() ) {  
    // not found  
     cout<<"Element not found";  
    }   
    else {  
        // found  
        cout << "Iterator points to " << it->first << " = " << it->second << endl;  
    }  
      
   return 0;  
}  




Cpp

Related
high school hacking competition Code Example high school hacking competition Code Example
If ERRORLEVEL Code Example If ERRORLEVEL Code Example
comment savoir si un nombre est premier c++ Code Example comment savoir si un nombre est premier c++ Code Example
pow in c++ Code Example pow in c++ Code Example
iterator on std::tuple Code Example iterator on std::tuple Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8