gpt4 book ai didi

c++ - "ISO C++ forbids declaration of ' 列表 ' with no type"错误

转载 作者:太空宇宙 更新时间:2023-11-03 10:41:43 26 4
gpt4 key购买 nike

<分区>

我在包含 list<string> 的每一行中不断收到以下错误下面:

  • ISO C++ forbids declaration of 'list' with no type
  • expected ';' before '<' token

#ifndef __REGNAMEGENERATOR_H
#define __REGNAMEGENERATOR_H

#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <iostream>
#include <sstream>

#define Max_reg_Num 1000

using namespace std;

class RegNameGenerator{
private:
int intRegNumber;
int realRegNumber;
list<string> UsedIntReg; // error
list<string> UsedRealReg; // error

public:
RegNameGenerator();
~RegNameGenerator();
string generateIntReg();
string generateRealReg();
list <string> getUsedIntReg(); // error
list <string> getUsedRealReg(); // error
int getIntRegNum();
int getRealRegNum();
};

#endif

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com