0
오류의 구조체에 대한 잘못된 초기화 : 나는 너희들 미안 해요 코드오류 : C++
Assoc<keyType,valueType>& found = internalStorage.get(find(key));//returns the value of some key
에 대한
invalid initialization of reference of type
Assoc<float, std::basic_string<char> >&
from expression of typeconst Assoc<float, std::basic_string<char> >
, 나는 그것이 재미 있지 알고,하지만 난 당황 해요.
어떤 아이디어가 문제입니까?
실제로. 참조를 const로 만들면 제대로 작동합니다. Visual C++는 불행히도 *이 코드를 허용합니다 :) – heinrichj