The following two classes are absolutely equivalent in every way except their name:
struct s
{
int x;
};
class c
{
public:
int x;
};
Is there a difference in speed between reading from a struct then a class?
For example,
is
int y = s.x
Slower then
int z = c.x
to run? Is one of them less efficient to read from?