Add a member function (original) (raw)

In Class View, you can add a member function to any class. When you do this, a declaration is added to the header file, and a stub member-function body is added to the class's implementation file, which you can then modify.

To add a member function to a class:

  1. In Class View, expand the project node to display the classes in the project. (To open Class View, on the menu bar, choose View, Class View.)
  2. Open the shortcut menu for the class you want to add a member function to, and then choose Add, Add Function.
  3. Provide the appropriate details about the member function. For more information, see Add member function wizard.
  4. Choose the Finish button to generate the member function code.

In this section

Add member function wizard

This wizard adds a member function declaration to the header file. It also adds a stub member function implementation to the implementation file for the selected class.

Once you've added the member function using the wizard, you can edit the code in the development environment.

char
double
float
int

long
short
unsigned char
unsigned int

unsigned long
void
HRESULT

char
double
float

int
long
short

unsigned char
unsigned int
unsigned long