我的读取不了数,求指点
int n = 0; int * a = new int[10]; for (int i = 0; i < 10; i++) { int x; cin >> x; if (x % 2 == 1) a[n++] = x; } for (int i = 0; i < n; i++) cout << a[i] << endl; delete[] a;