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
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
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.