The functions which are not member of any class, can they be a constant function?

can only member functions of class be a constant function or any function can be a constant function


this is showing error

hello @anujsharmabadboy
no u cannot make non member function constant.
if u want similar behaviour then make the pass parameter as const(that u dont want to change)

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.