Hi Team
I need some help on my following logic that must implement on void assign method. On this method void assign, must do
C++
#include
template
class interval_map {friend void IntervalMapTest();V m_valBegin;std::map m_map;
public:// constructor associates whole range of K with valinterval_map(V const& val): m_valBegin(val){}void assign( K const& keyBegin, K const& keyEnd, V const& val ) {
// Assign value val to interval [keyBegin, keyEnd).// Overwrite previous values in this interval.// Conforming to the C++ Standard Library conventions, the interval// includes keyBegin, but excludes keyEnd.// If !( keyBegin second;}}
};}
Answers
Know the answer? Post it. Somebody with the same question will find it here.