Możesz użyć algorytmu std::all_of z biblioteki <algorithm>:
#include <algorithm>
std::all_of(tablica, tablica + rozmiar, [&](type_tablicy value) { return value == tablica[0]; })
Przykład:
#include <algorithm>
#include <iostream>
int main() {
const std::size_t size = 8;
int array[size] = {5, 5, 5, 5, 5, 5, 5, 5};
if(std::all_of(array, array + size, [&](int value) { return value == array[0]; })) {
std::cout << "Good";
} else {
std::cout << "Bad";
}
std::cout << "\n";
}
http://en.cppreference.com/w/cpp/algorithm/all_any_none_of