Dear Community ,I'm trying to insert a set STL container into insert(int k) function;but the Linux Compiler says me: "set-btrees.cpp:336:23: error: no match for ‘operator[]’ (operand types are ‘s’ and ‘int’)
t.insert(data[i]);"
This issue belogs to the follow code:
!) The set was created from file like this:
data.insert(dato); //create set with unique values
dato is int dato and data comes from typedef std::set< int > s ;
t belogs to BTreeNode which has a friendly class called BTree . In Btree is defined void BTree::insert(int k) function and t.insert must receipt the data[i] values.