• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: standard input from console not working in Xcode 4.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: standard input from console not working in Xcode 4.5


  • Subject: Re: standard input from console not working in Xcode 4.5
  • From: Mikkel Islay <email@hidden>
  • Date: Fri, 21 Sep 2012 17:20:33 +0200

Dave,

I have encountered that issue as well.
You can force a refresh of the console by selecting a different output in the drop-down menu and then selecting target output again, or read from a ifstream for more complex input.

Mikkel

On 21 Sep 2012, at 16:52, email@hidden wrote:

> If I create a simple command line C++ program in Xcode 4.5 such as:
>
> #include <iostream>
> using namespace std;
> int main(int argc, const char * argv[])
> {
>    int x;
>    cout << "enter x: ";
>    cin >> x;
>    cout << x << endl;
>    return 0;
> }
>
> When I go to type in a value for x in the console, only the first digit is displayed as you type it although all digits are read:
>
> If I type: 123
> You only see the 1, but x does contain 123 as the next output line shows.
>
> I've seen this on three separate machines, two with 10.8 and one with 10.7.
>
> Yes, I'll file a radar, but does anyone know a workaround (I can run the program from the Terminal fine) as this is driving my students nuts.
>
> Thanks,
> Dave
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: standard input from console not working in Xcode 4.5
      • From: Dave Reed <email@hidden>
References: 
 >standard input from console not working in Xcode 4.5 (From: email@hidden)

  • Prev by Date: standard input from console not working in Xcode 4.5
  • Next by Date: Re: Error uploading App (SOLVED)
  • Previous by thread: standard input from console not working in Xcode 4.5
  • Next by thread: Re: standard input from console not working in Xcode 4.5
  • Index(es):
    • Date
    • Thread