prog.cpp:11:25: error: empty character constant
~Char(){ cx=''; }
^
prog.cpp: In member function 'char Char::getChar()':
prog.cpp:13:46: error: 'class Char' has no member named 'x'
char getChar(void){ return this->x; }
^
prog.cpp: In member function 'Char& Char::operator=(const Char&)':
prog.cpp:18:23: error: 'const class Char' has no member named 'x'
cx = tmp.x;
^
prog.cpp: In function 'int main()':
prog.cpp:29:12: error: invalid initialization of non-const reference of type 'Char&' from an rvalue of type 'Char'
Char cy = 'x';
^
prog.cpp:10:13: note: initializing argument 1 of 'Char::Char(Char&)'
Char(Char &tmp){ cx=tmp.cx; }
^
prog.cpp:9:13: note: after user-defined conversion: Char::Char(char)
Char(char ctmp):cx(ctmp){}
^
prog.cpp:30:7: error: redeclaration of 'Char cy'
Char cy = cx;
^
prog.cpp:29:7: note: 'Char cy' previously declared here
Char cy = 'x';
^