Your problem is here:
richEdit re();
Is not a default-constructed object of type richEdit
. Is a declaration of a function named re
that takes no arguments and returns a richEdit
.
You want this instead:
richEdit re;
...or in C++11:
richEdit re{};
Note that a blocking destructor is something that will certainly give you headaches in the future.