lundi 4 juillet 2016

func(QWidget* const &widget) VS func(QWidget* const widget)

I've noticed a peace of code works even throwing away the ampersand/reference signal.

QWidget* widget;
func(widget);

Do the following expressions mean the same?

func(QWidget* const &widget)
func(QWidget* const widget)

I understand both are pointers that cannot be modified to stuff that can be modified.

Aucun commentaire:

Enregistrer un commentaire