Input is automatically bypassed and "no" string not recognized
Thundrstruck87 (2)

Hey everyone, I'm having a couple weird issues with my code that I can't figure out - so I would appreciate if I can get any help. I've started to learn C++ so I apologize if it's something simple I am missing.

From the photo and code, I have a couple cout and cin lines (lines 65 and 67) that work as intended up until "Year". For some reason that is automatically bypassed and you can't put anything in, where as the other input fields you can. I was able to type in a year (1990, or 2012 for example) if it behaved, but it feels like enter on my keyboard is hit twice and moves to the next line. However, I tried two different IDE's, and two different computers with the same issue, so something is weird with the code.

The other problem I am having is "no" is not recognized for some reason? Example would be the "NewCustomer()" function and the if statement where the "no" is. It returns the "bash: no: command not found" error message.

Thank you for the help!

You are viewing a single comment. View All
Answered by Kai_Justice (271) [earned 5 cycles]
View Answer
JacobMcPherson1 (239)

your getting the "bash: no: command not found" error because the program is ending before you can answer the yes/no question

JacobMcPherson1 (239)

also, I probably wont be able to help with the other stuff because I'm not that good at C++

Thundrstruck87 (2)

@JacobMcPherson1 Yeah I figured so 😄. I appreciate your help anyways!