Apple's languages of choice are Objective-C (older) and Swift (newer). These are what Xcode is primarily set up to use, although the runtime allows C, Objective-C, C++ and Swift code to run within a single program. You can use C++ for your application, but to link against the various Cocoa frameworks (which are in Objective-C), Objective-C or Swift wrappers will need to be used for your user interface and C++ objects. A typical application layout would use Objective-C or Swift for the user interface, calling into C/C++ libraries as needed.
For your example, normally you would use the Interface Editor to create the text fields and buttons and connect them to outlet properties and action methods defined in your code. There are quite a few tutorials and example applications using Objective-C and Swift, not so much for using C++ in Xcode.