kinda new need help
Hey there im taking a intro course to c++ and we have a small assignment where we have the user input a string like:
He was 14 ten years ago. The next line should display just the numbers.
i also know i have all the appropriate includes just need to know how to get the isdigit to check the string and pull the numbers for display.
cout<<"Enter a sentence with at least one number in it."<<endl;
thanks ahead of time.
What? You are not making any sense as to what you want to do.
Also, it is a good idea to replace char word with std::string word and cin.getline(...) with std::getline(std::cin, word).