works with nano but not on xcode, hmm..

Dec 21, 2014 at 7:34pm
so this is my first while loop, i dont understand why it wont actually run after it builds in xcode.. the build is always successful but there is never any output and the program just constantly repeats itself. but it works perfectly fine on my built in bash terminals mini editor: nano.

anyone have any idea why??



#include <iostream>
using namespace std;

int main(){


int i = 0;

while (i < 10) {
cout << "i = " << i << endl;
i++;
}
return 0;
}
Dec 21, 2014 at 8:34pm
Runs just fine on my machine. In xcode.
You might try and open and run it in a new project to make sure your getting all the default project settings.
Last edited on Dec 21, 2014 at 8:35pm
Topic archived. No new replies allowed.