I am having trouble converting a string to an integer with istreamstream. I've researched it, tried several different methods, and none seem to work. When I go through the code with the debugger, everything runs smoothly until the actual insertion from the stringstream to the int variable. From what I've ben able to find online, this should work. Any suggestions would be very appreciated.
I'm getting the error when I run it. I on a mac (10.6) using Xcode. I'm fairly new to programming. Could this make a difference? Here's my output if it helps:
Welcome to TeaMood.
It is currently: Thu Dec 17 10:13:46 2009
Tea time!
10
Error setting timeOfDayInteger
Thu
Dec
0
It's winter god damn it.