// Generally, GCC is the best compiler for learning C / C . However, the program can be compiled in G 3.4.4.
#include
Class Val_box {private: int val;} void set (int new_val) {val = new_val;} Val_box & operator = (Val_box & right) // In fact, const is required {// Reserved Operator's Heavy Duty Val = Right.val; Return * this;}};
class query {private: vector
INT main () {query test_class; test_class.insert (1); test_class.insert (2); test_class.insert (3); cout << Test_class << endl; cin.get (); return 0;}
/ * VC2005 error description: Error 1 Error C2679: binary '=': No Operator Found Which Takes a Right-Hand OPERANDEPE 'Const Val_box' (or there is no acceptable conversion)