In addition, preferable, put your class definition at the top before the main block. Also, it seems you're using MS Visual studio. Nonetheless, there's no need preceding the call to string type with 'std::', if you've "using namespace std" statement before main block.
With suggestion given above, I am getting below errors.
Error 1 error LNK2019: unresolved external symbol "public: __thiscall Display::~Display(void)" (??1Display@@QAE@XZ) referenced in function _main
Error 2 error LNK1120: 1 unresolved externals
The reason is that you did not implement ~Display() (the body is missing). You can actually omit the destructor if there is nothing to do (the compiler will generate one for you).
crosslink wrote:
there's no need preceding the call to string type with 'std::', if you've "using namespace std" statement before main block.
I wouldn't recommend that. The namespace is there for a good reason: Avoiding names clash.