If you have a global pointer to myapp, you can access from the same case block. Or you can modify the cmdw class to accepta pointer to myapp in the constructor. Then, myapp->loadTurnReport(filename);