Generation

generate functionThu, 26 Jan 2023

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

int getLastThree(string str) { return atoi(str.substr(str.length() - 3).c_str()); }

Questions about programming?Chat with your personal AI assistant