Please list the steps in detail on what you did to create the code and compile it. The information you provided isn't enough for people to answer your question. Providing more details on what you did to create the code and compile it will give people here a chance to give you a helpful answer.
You tagged your question as Xcode, but your screenshot looks like Visual Studio Code. Did you create a project in Xcode or create a C++ file in Visual Studio Code?
Does you MacBook have an Intel processor or an Apple Silicon (M1 or M2 chip)? The linker error says it can't find a main function for the Intel architecture.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: