prog.cpp:3:17: error: expected ‘;’ at end of member declaration
prog.cpp:4:19: error: expected ‘;’ at end of member declaration
prog.cpp:4:21: error: ‘b’ does not name a type
prog.cpp:5:19: error: expected ‘;’ at end of member declaration
prog.cpp:5:21: error: ‘b’ does not name a type
prog.cpp: In function ‘int main()’:
prog.cpp:8:15: error: no match for ‘operator=’ in ‘z.Z::a = 3’
prog.cpp:8:15: note: candidates are:
prog.cpp:1:12: note: A& A::operator=(const A&)
prog.cpp:1:12: note: no known conversion for argument 1 from ‘int’ to ‘const A&’
prog.cpp:1:12: note: A& A::operator=(A&&)
prog.cpp:1:12: note: no known conversion for argument 1 from ‘int’ to ‘A&&’
prog.cpp:9:9: error: ‘cout’ is not a member of ‘std’
prog.cpp:9:24: error: ‘union Z’ has no member named ‘b’
prog.cpp:11:15: error: no match for ‘operator=’ in ‘y.Y::a = 3’
prog.cpp:11:15: note: candidates are:
prog.cpp:1:12: note: A& A::operator=(const A&)
prog.cpp:1:12: note: no known conversion for argument 1 from ‘int’ to ‘const A&’
prog.cpp:1:12: note: A& A::operator=(A&&)
prog.cpp:1:12: note: no known conversion for argument 1 from ‘int’ to ‘A&&’
prog.cpp:12:9: error: ‘cout’ is not a member of ‘std’
prog.cpp:12:24: error: ‘union Y’ has no member named ‘c’