I am a C++ noob, so please don’t mind if you find this question silly
I am declaring map in C++ a below:
std::map<CartesianLocation, std::list<RadioSignal<RadioDevice>>> radioMap;
Full code:
Don't know but using below code, I could able to solve my issue
class RadioMap:public std::iterator_traits<CartesianLocation>, public Cloneable<RadioMap> {
private:
std::map<const CartesianLocation*, const std::list<RadioSignal<RadioDevice>>*> radioMap;
std::vector<RadioDevice> radioDevices;
public:
void add(const CartesianLocation *location, const std::list<RadioSignal<RadioDevice>> *observedSignals){
radioMap[location] = observedSignals;
}
On this line radioMap[location] = observedSignals;
I am ended with this error
“Invalid operands to binary expression ('const CartesianLocation' and 'const CartesianLocation’)” on struct _LIBCPP_TYPE_VIS_ONLY less : binary_function<_Tp, _Tp, bool> { _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY bool operator()(const _Tp& __x, const _Tp& __y) const {return __x < __y;} };
Any idea where I may be wrong?