SyntaxFix
Write A Post
Hire A Developer
Questions
This is similar to PierreBdR, without copying the map.
PierreBdR
#include <map> using namespace std; bool create_map(map<int,int> &m) { m[1] = 2; m[3] = 4; m[5] = 6; return true; } static map<int,int> m; static bool _dummy = create_map (m);