So I was thinking of ways to improve my c++ skills and I thought up this problem:
"Create a program where a user enters a string, have the program ask how many characters the user wants read from the string. Pass the string & the number of letters the user wants read to a function which returns a new string consisting only of the number of characters the user wants read."
I.E.
Enter a string :
The dog was awesome.
Enter # of characters you want read into new string :
7
New string : The dog
I could do this with a character array but I'm having trouble figuring a way to do it with a string variable. Any tips anyone?