lundi 19 mars 2018

Instance of an object as function using function operator

An instance of an object as a function using function operator

How can the following code work, particularly declaring an instance then using it as a function call? line 2. How should the function operator be done?

Temp<int> inst(3);
inst(1, 1) = 3;
Temp<int> & instref = m;
std::cout << instref(1, 1);

Aucun commentaire:

Enregistrer un commentaire