Verifique se a string inteira é maiúscula
#include <iostream>
#include <string>
#include <algorithm>
int main() {
std::string s = "HELLo";
if (std::all_of(s.begin(), s.end(), [](unsigned char c){ return std::isupper(c); })) {
std::cout << "Is uppercase." << '\n';
} else {
std::cout << "Is not uppercase." << '\n';
}
}
Open Oyster