Possible Duplicate:
Using array as map value: Cant see the error
Assume I have the following data structure:
std::map<size_t, double[2] > trace;
how can I access its elements with the operator[]?
Essentially I want to do something like:
trace[0][0] = 10.0;
trace[0][1] = 11.0;
In compiling these lines of code I get the following error:
/usr/include/c++/4.6/bits/stl_map.h:453:11: error: conversion from ‘int’ to non-scalar type ‘std::map<long unsigned int, double [2]>::mapped_type {aka double [2]}’ requested
comments?