小编M. *_*ann的帖子

如何修复此数组用作初始值设定项错误?

保存.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)

我使用 …

c++ error-handling g++ g++4.9

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++ ×1

error-handling ×1

g++ ×1

g++4.9 ×1