struct ITEM
{
unsigned int id_;
unsigned short level_;
};
void reset(ITEM* item[])
{
for (unsigned short i = 0; i < 3; i++)
{
item[i]->level_ = 3-i;
cout << item[i]->id_ << " " << item[i]->level_ << endl;
}
}
int main()
{
ITEM* item[10];
for (unsigned short i = 0; i < 10; i++)
{
ITEM tmp;
tmp.id_ = i;
tmp.level_ = i;
item[i] = &tmp;
cout << item[i]->id_ << " " << item[i]->level_ << endl;
}
reset(item);
system("pause");
return 0;
}