Problem with calling c++ functions of another class by pressing E key

this code is not so good(( its luggy.