works with nano but not on xcode, hmm..

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;
}
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
Topic archived. No new replies allowed.