Hi
I can't figure out why this short piece is giving an error at the point where I add an element to the map. Any ideas much appreciated, thanks in advance.
Code:#include <map> using namespace std; class component{ int failureRate; public: int getFailrate(){ return failureRate; }; component(int Ifail):failureRate(Ifail){}; }; int main(){ component comp(8); map<int,component> compMap; compMap[8] = comp; // this line is giving a compilation error! while(1); return 0; }