नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'class' : multiple assignment operators specified
Remarks
The class has multiple assignment operators of a single type. This warning is informational; the constructors are callable in your program.
Use the warning pragma to suppress this warning.
Example
The following example generates C4522.
// C4522.cpp
// compile with: /EHsc /W3
#include <iostream>
using namespace std;
class A {
public:
A& operator=( A & o ) { cout << "A&" << endl; return *this; }
A& operator=( const A &co ) { cout << "const A&" << endl; return *this; } // C4522
};
int main() {
A o1, o2;
o2 = o1;
const A o3;
o1 = o3;
}