I am a new coder so forgive me for asking what maybe a very simple question. I am looking at some sample code on a method I am seeking to implement and I see the header seen below (first block of code).
class CIndividual
{
public:
CIndividual();
virtual ~CIndividual();
public:
vector<int> profit;
vector<int> weight;
public:
CRandomNumber Rnd;
bool dominated;
};
Why is public used multiple times? I am extremely confused by this coding structure and hope that this question is not too basic.
public
declarations are relevant is with toolkits like Qt where you could seepublic slots:
in addition to justpublic:
. – Uncinus