dimanche 5 septembre 2021

Local variables are not allowed in default arguments unless used in unevaluated context

I just started with C++ and I came across this line in a book. I don't completely understand as to what it means precisely. Can somebody please explain it simply with an example as to what it is saying.

I found this link, but it's not very clear as to what it is saying

Link: https://en.cppreference.com/w/cpp/language/default_arguments

Aucun commentaire:

Enregistrer un commentaire