Visual C++ Structures in Class Designer
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Visual C++ Structures in Class Designer.
Class Designer supports C++ structures, which are declared with the keyword struct. Following is an example:
struct MyStructure
{
char a;
int i;
long j;
};
For more information about using the struct type, see struct.
A C++ structure shape in a class diagram looks and works like a class shape, except that the label reads Struct and it has square corners instead of rounded corners.
| Code element | Class Designer view |
|---|---|
struct StructureName {}; | StructureName Struct |
Working with Visual C++ Code (Class Designer)
Classes and Structs
struct
Show: