#fast title change
4 messages · Page 1 of 1 (latest)
this fixed it
{
const string charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
random_device rd;
mt19937 gen(rd());
uniform_int_distribution<> dis(0, charset.size() - 1);
string random_chars;
generate_n(back_inserter(random_chars), 16, [&]() { return charset[dis(gen)]; });
wstring new_title = base_title + L" | " + wstring(random_chars.begin(), random_chars.end());
SetConsoleTitle(new_title.c_str());
}```
prefer using a std::string_view instead of a std::string for the charset
Decrease the time between updates by removing "this_thread::yield();"