I can see a few. For one thing, the array is populated with values in the range 0 to 4, therefore a value of 22 will never be found. More important, a binary search only works on data which is sorted into key sequence. Since the data is random, a binary search is not applicable unless you first sort the data.
A couple of other points. You call srand() in both main() and RandomGeneratorNumber() which is not necessary. Normally you call srand just once at the start.
The loop at line 37 executes too many times: for(int i = 0; i<= length; i++)
should be i<length
The constructor does not check whether sopt is bigger than max, it should or the program could attempt to access data outside the bounds of the array.
It is better to use constint max = 1000; rather than #define
It is also best to avoid putting usingnamespace std; inside header files, as it forces that upon whichever file includes the header whether it is wanted or not.