at the end of the if statement turtorial there comes the && !.
how do you put the and or not in the function
Printable View
at the end of the if statement turtorial there comes the && !.
how do you put the and or not in the function
meh?
lets say you are checking for two things, if a glass is full and if it has ice in it (sorry for the stupid example)
the && [and] checks both of the variables...of one of them is false it doesn't check the second, and the if body is not executed.Code:bool is_full = true;
bool ice = true;
if( is_full && ice )
std::cout << "ahhh...cool fresh drink"<< std::endl;