str() is a method used with stringstreams to get the string portion. It doesn't seem like you need stringstreams or str() here.
Remember that you can access strings as an array, so string[0] is the first character of the string.
string.str(s) <= s doesn't make any sense. You were on to something when you were talking about the length() method. So you know how long the string is once you've read it in.
If you are calling your method in main, you need to pass in all of the parameters including the reference ones.
Reputation Points: 1165
Solved Threads: 578
Quantitative Phrenologist
Offline 4,271 posts
since Sep 2009