1

I was wondering what two constant signs on a function parameter does in this case?

void virtual_via_pointer( const Employee * const );
anacy
  • 399
  • 4
  • 14

2 Answers2

1

This isn't specific to function parameters.

const Employee*

Means a "mutable pointer to a constant instance of Employee".

Employee* const

Means a "constant pointer to a mutable instance of Employee".

const Employee* const

Means a "constant pointer to a constant instance of Employee".

See also the Spiral Rule.

geometrian
  • 14,775
  • 10
  • 56
  • 132
0

The pointer and the pointee are both constant.

kiDDevil
  • 23
  • 1
  • 12