#include <iostream>
#include <iomanip> // For std::hex and std::setw
using namespace std;
int main() {
// 定义字符串变量
std::string a = "1245a";
// 遍历字符串中的每个字符
for (char c : a) {
// 打印字符的 16 进制值
std::cout << "0x" << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(c) << ' ';
}
std::cout << std::endl;
return 0;
}