The compiler is right, of course.
C++
has NO
IsNumber
function, and
ch
is actually used uninitialised.
Why are you mixing
C I/O
calls with
C++
streams?
Did you mean something like:
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <int> v;
int i;
for (;;)
{
cout << "please enter a number (any other string to exit): ";
cin >> i;
if (!cin.good()) break;
v.push_back(i);
}
}