Show: Object Pascal C++
Display Preferences

Add Method (C++)

From Appmethod Topics
Jump to: navigation, search

Go Up to View Menu

Adds a method to a selected class, interface, or type in the C++ Class Explorer.

On the C++ Class Explorer Window, invoke the Add Method dialog box from either:

  • The Add a new method to this class ClExplAddMethod.bmp toolbar button
  • The context menu command Add method.
Note: The Add Method context menu command and Add a new method to this class ClExplAddMethod.bmp toolbar button are enabled only for elements that are declared in a C++ managed unit. To create a C++ unit, choose either:
  • File > New > Unit - C++
  • File > New > Form - C++
C++ managed units differ from ordinary C++ source files in that the header (.h) and implementation (.cpp) files are grouped together. For a C++ managed unit, the Code Editor displays a tab for the .cpp file and a tab for the .h file along the bottom of the window.
You cannot add fields, methods, or properties to FireMonkey elements using the C++ Class Explorer.

Item Description


Specifies the name of the method.

Return type

Specifies the return type expected by the method.


Specifies the visibility of the method being created. Select from:

Method parameters

Specifies the parameters expected by the method.


Specifies the C++ compiler directives used with the method. Select from:

See Also

Personal tools
In other languages