2012-10-28, 09:23 PM
Imagine Wrote:Pretty slowly.
What does size_t total = 0; do?
EDIT: And what would I do if I were dealing with strings rather than integers?
Ignore size_t, it's the biggest unsigned size possible on your system.
If you were dealing with strings chances are you would know arrays wouldn't you? const char*, std:
tring, and char[] would be the way to initiate a string in C++ (though std:
tring is preferred). Loop should almost be the same, instead you'd probably use getline(std::cin,string) for std:
tring and awful cin.getline for C-style strings.

