/vmb, /vmg (Representation Method)
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

/vmb, /vmg (Representation Method)


These options select the method that the compiler uses to represent pointers to class members. You can also use #pragma pointers_to_members or inheritance keywords in your code to specify a pointer representation.

Option Description
/vmb Use this option if you always define a class before you declare a pointer to a member of the class.
/vmg Use this option if you need to declare a pointer to a member of a class before defining the class. This need can arise if you define members in two different classes that reference each other. For such mutually referencing classes, one class must be referenced before it is defined.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Command Line property page.
  4. Type the compiler option in the Additional Options box.

To set this compiler option programmatically

See AdditionalOptions.

See Also

Compiler Options | Setting Compiler Options

© 2015 Microsoft