Uninitalized memory (int a; with no assignment) vector of int vectors (IE a dynamic int[][]) and attempting to find a, an int in the vector of vectors of int IE int instead of vector<int>. I think the iterator type is correct but I’m not sure off the top of my head
#include <vector> #include <algorithm> int main() { int a; std::vector<std::vector<int>> v; std::vector<std::vector<int>>::const_iterator it = std::find(v.begin(), v.end(), a); }assaults you with 42 errors, C++ templates are a joy 😊
But like…what’s the real bug?
Uninitalized memory (
int a;with no assignment) vector of int vectors (IE a dynamicint[][]) and attempting to finda, anintin the vector of vectors of int IEintinstead ofvector<int>. I think the iterator type is correct but I’m not sure off the top of my head