1

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

void virtual_via_pointer( const Employee * const );
anacy
  • 349
  • 4
  • 13

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.

imallett
  • 13,936
  • 9
  • 53
  • 121
0

The pointer and the pointee are both constant.

kiDDevil
  • 23
  • 1
  • 12