Sorry for my ignorance, but my execuse is that I am a begginer with C++.
I find const using const and static keywords very confusing.
for example:
What is the difference between the following uses:
Class Food {
int const apples = 24;
int const oranges = 12;
const void set_name(string food_name);
void display_name() const;
const char* fp1;
char const* fp2;
char* const fp3;
const char* const food_pointer;
};
I understand that when using const with variables means that I cannot modify the variables later in the program, but I am confused with other uses.
Any brief explainantion is greatly appreciated.