Hello,
Can anybody help me to write a nice code to find out if all values in array (vector or map) are the same.
int x[5] = {'1', '2, '3', '1', '2'}
int y[3] = {'1', '1, '1'} or int y[3] = {'3', '3', '3'}
I need to write a function which will return true if all values are identical in given array (case with X[5]) and false otherwise (case with Y[3]);
bool isSameValue(int *array)
{
}
Thanks in advanced.
Can anybody help me to write a nice code to find out if all values in array (vector or map) are the same.
int x[5] = {'1', '2, '3', '1', '2'}
int y[3] = {'1', '1, '1'} or int y[3] = {'3', '3', '3'}
I need to write a function which will return true if all values are identical in given array (case with X[5]) and false otherwise (case with Y[3]);
bool isSameValue(int *array)
{
}
Thanks in advanced.
Comment