Category : equals

To check if a vector has all equal values i usually do this: std::vector<bool> myVec(3); if(std::adjacent_find(myVec.begin(), myVec.end(), std::not_equal_to<>()) == myVec.end()){ // do if every value is the same } How can i use it to check if a vector of vectors has all equal values? This would be the case: std::vector<std::vector<bool>> my2DVec(3, std::vector<bool>(3)); Source: Windows ..

Read more

Can somebody help me figure out what is wrong with my =operator? Without these two functions, my program runs perfectly but once they are implemented it results in the error finished with exit code 11. I am trying to set two linked lists equal to each other. virticalList::virticalList(const virticalList &p2) { *this=p2; } virticalList & ..

Read more