0

I am working on a c++ project using Xcode and it has users involvement using Input from them. When I click enter image description here after opening my xcode project for the first time, everything is fine (user can put input using the console at the bottom) but if I click again, I cannot type anything in the console (when I click on random buttons on the keyboard, nothing is shown on the console, just the blinking cursor)

Any help would be appreciated.

EDIT: I even made another simple program (using cin to read a string and cout to output that) to check if the problem is my program; but in this case, the problem still persists! So, I am thinking its possibly an Xcode bug for everyone?? ( I am using Xcode 10.1)

enter image description here

farzan
  • 75
  • 6
  • [*Have you used `std::cin.ignore()`*](https://stackoverflow.com/questions/25475384/when-and-why-do-i-need-to-use-cin-ignore-in-c)? – Ruks Nov 10 '18 at 04:33
  • no I did not use that – farzan Nov 10 '18 at 04:37
  • Then that may be the problem since because whenever you press *Enter* (*`'\n'`*) on your keyboard, the `std::cin` stream is cleared and next it checks for the new line instead... And I also don't know how you are taking input so I really can't tell either... If you do use `std::cin` for input, then you should use `std::can.ignore()`... – Ruks Nov 10 '18 at 04:40
  • Can't help without seeing your code. – Shawn Nov 10 '18 at 04:40
  • I checked that too, still no change. Also, see my edition... – farzan Nov 10 '18 at 04:43
  • Plz to give us the codez. We wants them. –  Nov 10 '18 at 04:52

0 Answers0