xcode not showing output

Hi I was using Xcode for c++ (for competitive programming purposes, not sure if this is the standard choice but using it anyway) I included a <bits/stdc++.h> to the include file for XCode.app and they didn't show any error. But then when I ran my code, it showed "Build Succeeded" although no output was visible.

Answered by DTS Engineer in 802853022

Ah, <bits/stdc++.h>! If I had a dollar for every time that came up, I’d have at least… well… maybe five dollars (-:

I recommend that you avoid that include and instead just include the standard C++ headers. See this thread for more context.

As to why your output is not showing up, I very much doubt that it’s related to <bits/stdc++.h>. However, I think it’s worthwhile to rule that out first. Try this:

  1. In Xcode, create a new project from the macOS > Command Line Tool template.

  2. While doing that, choose C++ as your language.

  3. Choose Product run.

  4. Xcode should show the string Hello, World! in its console pane. If it doesn’t, choose View > Debug Area > Activate Console.

Can you got this to work?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Ah, <bits/stdc++.h>! If I had a dollar for every time that came up, I’d have at least… well… maybe five dollars (-:

I recommend that you avoid that include and instead just include the standard C++ headers. See this thread for more context.

As to why your output is not showing up, I very much doubt that it’s related to <bits/stdc++.h>. However, I think it’s worthwhile to rule that out first. Try this:

  1. In Xcode, create a new project from the macOS > Command Line Tool template.

  2. While doing that, choose C++ as your language.

  3. Choose Product run.

  4. Xcode should show the string Hello, World! in its console pane. If it doesn’t, choose View > Debug Area > Activate Console.

Can you got this to work?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

xcode not showing output
 
 
Q