C/C++ Troubleshooting C++ Program: Understanding usrStr and userInput Functions

  • Thread starter Thread starter elmessican
  • Start date Start date
  • Tags Tags
    C++ Program
AI Thread Summary
The discussion centers on difficulties in using the "usrStr" and "userInput" variables within two functions. The user notes that while the OutputWithoutWhiteSpace(userInput) function operates correctly, it introduces extra characters. Additionally, when calling the withoutspaces function, it adds the whitespace that was meant to be eliminated. A request is made for the user to share their code wrapped in specific tags for better troubleshooting.
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
 
Technology 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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
14
Views
34K
Replies
1
Views
5K
Replies
2
Views
5K
Replies
8
Views
4K
Replies
0
Views
2K
Replies
40
Views
3K
Back
Top