Generation

generate functionThu, 26 Jan 2023

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

int num = std::stoi(str.substr(str.size()-3, 3))

Questions about programming?Chat with your personal AI assistant