infinite amount of variables

So I have the problem that I want the person to input as much information as they want to, but I don't know how to make this work using variables. For example on a calculator the user should be able to input how ever many numbers he wants to add together, but I can't make like 100 variables in case the user wants to input 100 numbers. I guess what I am asking is if the program can make its own variables if needed, but that doesn't sound plausible, so I was wondering the right way to go about this.

thanks for any help in advance and I hope what I said makes sense
Google std::vector or std::set
You can use arrays or standard C++ containers as std::vector, std::list and so on.

An example of using an array

const size_t N = 100;

int a[N];

for ( size_t i = 0; i < N; i++ ) a[i] = i;
thank you very much for the help!
Topic archived. No new replies allowed.