prog.cpp: In function 'int main()':
prog.cpp:19:14: error: base operand of '->' has non-pointer type 'std::map<int, int>'
cout << arr->first <<" has frequency : " << arr->second <<endl;
^
prog.cpp:19:50: error: base operand of '->' has non-pointer type 'std::map<int, int>'
cout << arr->first <<" has frequency : " << arr->second <<endl;
^