Creating Methods with the C++ Class Explorer
Go Up to C++ Class Explorer Topics
This procedure illustrates how to create a method that is associated with a selected class or interface using the C++ Class Explorer.
To create a method in the C++ Class Explorer
- Do either of the following:
- Open the C++ Class Explorer as described here.
- If the C++ Class Explorer is already running , return to the C++ Class Explorer by clicking the C++ Class Explorer tab at the top of the window.
- In the Type List pane, select (click) the class or interface to which you want to add a method.
- Do either of the following:
- On the Add Method To <name> dialog box, enter a name for the method in the Name box.
- In Return type, either enter the data type of the return function you expect to receive for the method you are adding, or select a data type from the dropdown list.
- In Method parameters, enter the full parameter list for the method. Opening and closing parentheses are not required. If the method does not take any parameters, this field can be left blank.
- To enable specific compiler directives, click the appropriate checkbox, as follows:
- Click Add. The method is added to the class declaration in the C++ header file. A stub implementation is created in the C++ implementation file.