class twoTuple
{
public:
twoTuple(string type, string value);
~twoTuple();
string type; //类型
string value; //值
void setType(string type) { this->type = type; }
string getType() { return type; }
void setValue(string value) { this->value = value; }
string getValue() { return value; }
//返回二元式字符串
string show() {
return "(" + type + "," + value + ")";
}
private:
};
twoTuple::twoTuple(string type, string value)
{
this->type = type;
this->value = value;
}
twoTuple::~twoTuple()
{
}
int main()
{
twoTuple getNext(){
}
return 0;
}
函数内不能嵌套函数,把这个函数放到main函数上面