cpp中“:”符号的含义是什么?
#include <iostream>
#include <string>
int main () {
std::string word;
std::cin >> word;
int H[1024];
int big_h = 0;
for(char i : word) {
if(H[(int)i-97] > big_h) {
big_h = H[(int)i-97];
}
}
std::cout << big_h * word.size() << std::endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)