I had to change from using cin >> to using getline(cin,s) because it would only take the first word as input if there were spaces. Now the application is just infinitely outputting whatever the user inputs when there are spaces. Do I need to make it ignore spaces? How do I fix it so that it takes all of the input when there are spaces? My full code is below. Thanks in advance for help!
Cannot reproduce the problem. Show example of your input. Note that your program will take several seconds to process even 7 characters lines so if you have larger input, it just wasn't processesed fully yet.
input = "to be or "
chars = 9
count = 9! = 362880
secs = 28.796
EST (assuming same rate, approx 7.93541e-005 secs a term)
input = "to be or not"
chars = 12
count = 12! = 479001600
secs = 38010.7 = approx 38011
i.e. 10 hours 33 minutes 31 seconds
input = "to be or not to be that is the question"
chars = 39
count = 39! = 20397882081197443358640281739902897356800000000 http://www.tsm-resources.com/alists/fact.html
= approx 2.0398e+46
secs = 1.61866e+042 secs
CF
Age of Universe = approx 13.82 billion years = 13.82e+9 years
1 year = 3.15569e7 secs
Age of Universe = 436116358000000000 = 4.36116358e+17
So time to output all perms of "to be or not that is the question" (on my PC) is approx 3.71152e+024 times the age of the Universe.