2D マップにデータを挿入しようとしていますが、次のコードでアクセス違反エラーが発生します。
void StateManager::AddState(string stateName, map<string, IBaseComponent*> stateComponents)
{
// Add the state to the states map
m_States.insert(pair<string, map<string, IBaseComponent*>>(stateName,stateComponents));
}
誰かが私が間違っていることと、それを修正する方法を指摘できますか?
編集:いくつかのテスト値をマップに挿入しようとしましたが、うまくいきました。挿入しているデータに問題があるに違いありません。