Xcode is Apple's integrated development environment (IDE) for Apple platforms. Xcode provides tools to create apps for all Apple's platforms: iOS, iPadOS, tvOS, watchOS, and macOS. In addition, Xcode can be used to develop programs in many popular programming languages, including Swift, Objective-C, Objective-C++, C, C++, Java, Python, and more.
Download Xcode from Apple store
Select C++
Select a folder on your machine for the project.
A code template is created. You can insert your program there.
Click the Run button to run your program. Output from your program will be displayed on the Output windonw.