I am a C++ noob and i've a problem of understanding c++ syntax in a code. Now I am quite confused.
class date
{
private:
int day, month, year;
int correct_date( void );
public:
void set_date( int d, int m, int y );
void actual( void );
void print( void );
void inc( void );
friend int date_ok( const date& );
};
Regarding to the '&' character, I understand its general usage as a reference, address and logical operator...
for example int *Y = &X
What is the meaning of an & operator at end of parameter?
friend int date_ok( const date& );
Thanks
edit:
Thanks for the answers. If I have understood this correctly, the variable name was simply omitted because it is just a prototype. For the prototype I don't need the variable name, it's optional. Is that correct?
However, for the definition of the function I definitely need the variable name, right?
See Question&Answers more detail:os