Troubleshooting C++ Program: Understanding usrStr and userInput Functions

  • Context: C/C++ 
  • Thread starter Thread starter elmessican
  • Start date Start date
  • Tags Tags
    C++ Program
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
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
 
Physics news on Phys.org
Hi, and welcome to the forum!

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