Thread: c++ assignment
View Single Post
 
Reply
Posted 2007-05-21, 11:49 PM in reply to Willkillforfood's post starting "The only person that knows the answer..."
Could a mod please add some code tags to the OP? It's difficult to follow without them.

Oj, I've never used iostream, but it seems like a fairly trivial assignment. Are you having trouble adding the numbers together or using the write function from IOStream? If it's the latter, I would suggest looking up some documentation on the function at google or going through some code that uses the write function at www.krugle.com or some other code repository. If it's the former, it should be easily doable with a for loop.

It looks to me as if you're saving the input as a string, which seems like a difficult way to go about doing things. I'd use an integer array to store them rather than using a single string to store multiple numbers.
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes