Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
151 views

I have two version of the same function using std::any_of and std::find_if for checking whether an int exist in a vector (returned from g.getEdges()). However when I repeatedly run the std::any_of the ...
Yat Fung's user avatar
-2 votes
1 answer
464 views

Can anyone tell me the difference between memset() and std::fill() in c++? I am quite confused why my code doesn't work with memset() but does with std::fill(). I am making a Sieve of Eratosthenes ...
mya's user avatar
  • 1
1 vote
1 answer
222 views

I am not very familiar with C++, and am confused about how a comparator works. The below code is how I can find the position I want to insert a new interval: #include <algorithm> #include <...
Yuan's user avatar
  • 51
16 votes
7 answers
26k views

I want to compare one value against several others and check if it matches at least one of those values, I assumed it would be something like if (x = any_of(1, 2 ,3) // do something But the ...
baguettio's user avatar
  • 303