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

See also

Working with Visual C++ Code
Classes and Structs
struct