求大神来看一下错在哪里了!!!
程序代码:
int main() { int i; int num; cout << " /////////维护合法权利团体//////////" << endl; cout << "请输入捐款者数目:"; cin >> num; Number* pal = new Number[num]; for (i = 0; i < num; i++) { cout << "请输入捐款者的姓名:"; cin >> pal[i].name; cout << "请输入捐款者的款项:"; cin >> pal[i].money; } if (pal[i].money >= 10000) { for (i = 0; i < num; i++) { cout << "This Is Grand Patrons:" << pal[i].name << endl; } } system("pause"); return 0; }哪里错了?目的是当pal[i].money>10000时,输出相对应的pall[i].name的值