I think every line that use to open the file fails, but i don't know the culprit.
Its is better if this part can be fix:
Code:
if(strcmp(op, "open")== 0){
                      fopen("g:\\ccc\\example.txt","r"); break;
                      }
        else cout << endl << "Hint: open" << endl << "type again:" ;
    }
    
    // Close the file stream explicitly
    
    a_file.close();// i also tried delete this line but it also did not work