working on C++ error system