0

Non const function and const template function

Why const int a in main is not calling template function? https://code.sololearn.com/ctidsniA6e31/?ref=app

7th Apr 2021, 7:42 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
3 Respostas
0
Yeah got it... Thank you.. I updated code for pointer example. Currently function void print(int* p) is called from main function... But if I change it to void print(const int* p), it is not getting called... Why so ?
8th Apr 2021, 10:39 AM
Ketan Lalcheta
Ketan Lalcheta - avatar