#include <iostream> #include <map> template<class T> void f(std::map<int, T>::value_type& v) { std::cout << v.first << v.second << std::endl; } int main() { std::map<int, int> m; m[0] = 2; f<int>(*m.begin()); return 0; }
f
typename
void f(typename std::map<int, T>::value_type& v)
Login in to like
Login in to comment
or Read more about C++ Quizzes
Login in to like
Login in to comment