I am new to C++ and Xcode. I am currently running Xcode 8.2.1 on Mac OS Sierra 10.12.3. I recently created a new project using code from my C++ lesson book creating a basic function. When I compile the code, the product file created shows up in Finder as a document or text file as opposed to a Unix Executable.
When I created the standard simple “Hello World” project, I did not have this problem. The output in Xcode for this simple project is a Unix Executable.
I have not been able to find any information regarding this issue online or in the Xcode help files. I have been unable to determine whether this is a problem with Xcode, my use of Xcode settings, or the code that I am attempting to compile. Does anyone know why the output for the more complex (slightly) program is different? Basic code is below:
#include <iostream>
using namespace std;
int DemoConsoleOutput();
int main()
{
DemoConsoleOutput();
return 0;
}
int DemoConsoleOutput()
{
cout << "Pi more accurately is 22/7 =" << 22.0/7 << endl;