After updating XCode, output terminal problem

Discussion in 'Mac Programming' started by iMacFarlane, Sep 21, 2012.

  1. iMacFarlane macrumors 65816

    iMacFarlane

    Joined:
    Apr 5, 2012
    Location:
    Adrift in a sea of possibilities
    #1
    I'm taking a C++ class for college, and have been using XCode as my compiler. We are writing simple programs using the terminal for output, mainly cout and cin commands.

    Thing is, after I updated to the new XCode yesterday, all my programs that use cin have a new, strange behaviour. When I enter whatever is needed into the program at runtime, the terminal only echoes the first character I pressed. The cin function actually receives the entirety of my input string, but I'm typing blind. All the programs still work just fine, but what gives with the terminal not echoing characters as I type during a call to cin?

    Anyone else seen this or can reproduce?
     
  2. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #2
    There's nothing to reproduce if you don't post any code.
     
  3. szymczyk macrumors regular

    Joined:
    Mar 5, 2006
    #3
    I saw a discussion about this issue on Apple's paid developer forums. Apple's Xcode engineers are looking into this issue, but there's no fix yet.
     
  4. mabeyman macrumors member

    Joined:
    Sep 21, 2012
    #4
    Hey im in college too and have been using Xcode and I am experiencing the exact same thing. Very frustrating. I exported the .cpp to Visual Studio and the code worked fine so its something with Xcode. Glad im not the only one having problems
     
  5. robvas macrumors 68020

    Joined:
    Mar 29, 2009
    Location:
    USA
    #5
    Run your programs from the Terminal
     
  6. iMacFarlane thread starter macrumors 65816

    iMacFarlane

    Joined:
    Apr 5, 2012
    Location:
    Adrift in a sea of possibilities
    #6
    The problem seemed so simple and universal it didn't even occur to me to post any, but this'll do:

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
        int number;
        
        cout << "Type a number between 10 and 10000\n";
        cin >> number;
        cout << "See how I only echoed the first digit?\nI WAS listening, and actually stored " << number << endl;
    }
     
  7. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #7
    I control click on the Xcode Products result in the File Navigator, select Show in Finder, then double-click the executable's icon. Runs the command-line app in a Terminal Window, which is much more configurable.

    But debugging is a pain.
     
  8. iMacFarlane thread starter macrumors 65816

    iMacFarlane

    Joined:
    Apr 5, 2012
    Location:
    Adrift in a sea of possibilities
    #8
    Well, it looks like Apple's rolling out the update to fix Xcode. This problem was actually the top of their corrections list, the rest of the list is pretty minor stuff. Wow, Apple, really? 1.61GB to fix a text printing problem? Over one and a half trillion bytes to squeeze in that fix? One greek letter for you - Delta.
     
  9. robvas macrumors 68020

    Joined:
    Mar 29, 2009
    Location:
    USA
    #9
    71.94MB

    [​IMG]
     
  10. iMacFarlane thread starter macrumors 65816

    iMacFarlane

    Joined:
    Apr 5, 2012
    Location:
    Adrift in a sea of possibilities
    #10
    Yeah, it looks like something's up. My download failed after about 50MB, and now I can't get it to finish. It definitely started at 1.61GB, though. Super.
     

Share This Page