map[]返回引用

702 阅读1分钟

C++ map[]返回的是引用

	map<char, int> m;
	m['a'] = 1;
	cout<<m['a']<<endl;
	m['a']++;
	cout<<m['a']<<endl;
	return 0;
}

1,2