请教下各位大佬,下面代码怎么跟预期输出的不一致
char name;UF_OBJ_ask_name(objects, name);
// 遍历字符串,找到数字部分
for (char c : name) {
if (std::isdigit(c)) {
numberStr += c;
}
else
{
head += c;
}
}
// 将数字字符串转换为整数
if (!numberStr.empty()) {
number = (int)std::strtol(numberStr.c_str(), nullptr, 10);
number++;
std::string str7 = std::to_string(number);
head.append(str7);
//std::cout << "Extracted number: " << number << std::endl;
uc1601(head.c_str(), 1);
UF_UI_write_listing_window(name);
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(head.c_str());
UF_UI_write_listing_window("\n");
UF_UI_write_listing_window(str7.c_str());
UF_UI_write_listing_window("\n");
请问下这个head怎么不是输出DIE-223
看不懂,等大佬回复{:3_48:}
页:
[1]