• 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
standard input from console not working in Xcode 4.5
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

standard input from console not working in Xcode 4.5


  • Subject: standard input from console not working in Xcode 4.5
  • From: email@hidden
  • Date: Fri, 21 Sep 2012 10:52:40 -0400

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

  • Follow-Ups:
    • Re: standard input from console not working in Xcode 4.5
      • From: Chris Lattner <email@hidden>
    • Re: standard input from console not working in Xcode 4.5
      • From: Mikkel Islay <email@hidden>
  • Prev by Date: Re: Error uploading App (SOLVED)
  • Next by Date: Re: standard input from console not working in Xcode 4.5
  • Previous by thread: Re: Error uploading App (SOLVED)
  • Next by thread: Re: standard input from console not working in Xcode 4.5
  • Index(es):
    • Date
    • Thread