Monday, November 1, 2010

C++ Style Structs

The following code is in the C style and not in the C++ style:

typedef struct MyStruct_tag
{
  int a;
  int b;
} MyStruct;

The following code is in the C++ Style:

struct MyStruct
{
  int a;
  int b;
};

No comments:

Post a Comment