Answers for "how to have or in if statement c++"

C++
5

c++ if in equivalent

#include <algorithm>
#include <vector>

if ( std::find(vec.begin(), vec.end(), item) != vec.end() )
   do_this();
else
   do_that();
Posted by: Guest on July-09-2020
1

if c++

if (condition) {
  // block of code to be executed if the condition is true
}
Posted by: Guest on October-04-2021

Browse Popular Code Answers by Language