नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'=': re-initializing a reference or assignment through a reference-to-function is illegal
Remarks
Cannot assign to a reference through a function because functions are not lvalues.
Example
The following example generates C3853:
// C3853.cpp
// compile with: /EHsc
#include <iostream>
int afunc(int i)
{
return i;
}
typedef int (& rFunc_t)(int);
int main()
{
rFunc_t rf = afunc; // OK binding a reference to function
rf = afunc; // C3853, can't reassign to a ref that's an lvalue
int i = 99;
int & ri = i;
std::cout << i << std::endl;
ri = 0; // OK, i = 88;
std::cout << i << std::endl;
}