反正我可以通过类如下面的类传递参数。C++通过一个数组索引来传递参数/
class cat
{public:
void dog(int ID, char *value) // int ID I'd like to be the index array it was called from?
{
debug(ID, value);
}
}
cat cats[18];
cats[1].dog("value second arg, first arg auto filled from index array");
我不明白你想要什么。换句话说,这对我来说没有意义。原样 – 2013-07-06 06:01:35
你为什么将类和方法命名为相同的东西?这使得很难告诉你想要做什么。 – user2357112
我想在传递索引数组的类中存储一个INT命名ID。 –