What I am trying to do, is allow the user to input any number of variables (for ex: 1 6 945 fhds)and my program will check for any strings. I have heard of arrays, but I feel like I can only limit how many inputs the user can have. Foo seems to need pre-input coded into the program? Can anybody clarify how to do this?
I tried lol:
#include <iostream>
using namespace std;
int main() {
int x;
int array[x];
cout << "Enter 5 numbers: ";
for (int x = 0; x = <char>; ++x) {
cin >> x;
}
cout << x;
return 0;
}