The code below works fine on Windows, but when I compile it on Mac's Xcode, I don't get any output.
#include <iostream>
#include <stack>
using namespace std;
int main(int argc, const char * argv[]) {
stack<int> S;
S.push(5);
cout << S.top();
return 0;
}