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));

Want to kickstart your project?Use the new AI Studio to create your code