J
james545
I saw some code written where member functions were written inside
struct definition blocks and was wondering if this is an advisable or
common style of programming in C/C++?
The type of code I saw compiled under the g++ compiler and looked like
this:
typedef struct A
{
int x;
int y;
A(int, int);
~A();
} a;
....
A::A(int q1, int q2)
{...}
A::~A()
{...}
struct definition blocks and was wondering if this is an advisable or
common style of programming in C/C++?
The type of code I saw compiled under the g++ compiler and looked like
this:
typedef struct A
{
int x;
int y;
A(int, int);
~A();
} a;
....
A::A(int q1, int q2)
{...}
A::~A()
{...}