For example, I have this array:

```
int myArray[] = { 3, 6, 8, 33 };

```

How to check if given variable x is in it?

Do I have to write my own function and loop the array, or is there in modern c++ equivalent to `in_array` in PHP?