Guys,
I have some structure definition inside my class and it seems to be c like if your using struct so I want to change my style. but what is the best style to do this.
below is my old code:
class B
{
public:
typedef struct s_A
{
int X;
int Y;
int Z;
} t_A;
protected:
private:
};
class B
{
public:
typedef struct s_A
{
int X;
int Y;
int Z;
} t_A;
protected:
private:
};
To copy to clipboard, switch view to plain text mode
I want to change this to
class B
{
public:
class t_A
{
public:
int X;
int Y;
int Z;
} ;
protected:
private:
};
class B
{
public:
class t_A
{
public:
int X;
int Y;
int Z;
} ;
protected:
private:
};
To copy to clipboard, switch view to plain text mode
is there any advantage using the old struct vs. the class inside a class style?
i want to still scope the class/struc t_A like below at the end of the day.
B::t_A param;
B::t_A param;
To copy to clipboard, switch view to plain text mode
baray98
Bookmarks