保存.cpp
#include "save.h"
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
Save::Save()
{
}
Run Code Online (Sandbox Code Playgroud)
我已经注释了所有函数并从 Save::Save 中删除了内容,但它不会影响错误。
保存.h
#ifndef SAVE_H
#define SAVE_H
#include <iostream>
#include <string.h>
#include <fstream>
using namespace std;
class Save
{
public:
Save();
void vDisplay();
char cDecode();
bool bFileExists(const string& crsFileName);
const char ccTab = 9;
const char ccHelp[5] = "help";
const char ccNo[3] = "no";
const char ccStart[6] = "start";
const char ccQuit[5] = "quit";
const char ccYes[4] = "yes";
};
#endif // SAVE_H
Run Code Online (Sandbox Code Playgroud)
我使用 …