C++ function adding extra characters to output

  • Topic: C/C++ 
  • Thread starter elmessican
  • Start date
  • Tags Tags
    C++ Program
1 reply · 2K views · last reply
elmessican
Messages
6
Reaction score
0
I'm having trouble understanding how to use the "usrStr" or how to use the userInput in both of my functions. I know the problem with my code, i see that when i call the OutputWithoutWhiteSpace(userInput) function it works fine but it adds the extra characters

first sentence = 46 characters
then when i call the withoutspaces fuction it adds the whitespaces eliminated to the result
 
Hi, and welcome to the forum!

Could you post the code you are talking about? Please wrap it in the [CODE]...[/CODE] tags.