I'm currently working on a code for taking in a character array, a[], and it's length n. It's then supposed to reverse all of the letters and return them as a string
how would i go about changing my code so that it reverses the entire char array into a string? I can only get it to return the first character at the moment
In the above code, wouldn't it be better to create the stringstream as a staticvariable, so that it's just changed rather than recreated each run of the function?
Depending on the size of the char-array, there could be an efficiency issue?
I did that just moments ago... The point is the stream cannot be reset when it is completed...
This causes the result to be deleted before it is returned...