Answers for "if statement c++ with and"

C++
6

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
0

if statement C++

if (condition)
{
	// block of code
}
else if (condition)
{
	// block of code
}
else {
	// block of code
}
Posted by: Guest on June-24-2021

Browse Popular Code Answers by Language