Generation

generate functionThu, 26 Jan 2023

how to convert the last 3 characters on a string into an int

string s = "12345"; int x = stoi(s.substr(s.size() - 3));

Questions about programming?Chat with your personal AI assistant