Char Variable generator

I am new to C++ and I have an idea to solve a certain program problem I am having but I do not know if this is even possible.

If I want a program to have the ability to accept an infinite number of char designated float quantities is there a way to make a nested loop that basically adds a trailing value to a defined char variable. the only way I can think to express this in english is like:
char input1, input2, inputn....

and then i would just run all of those char inputs through a while loop (im pretty sure i know how to do that).

thank you
You can have a vector:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <vector>

//...

std::vector<char> inputs;

// adding a new element to the end of the vector:
inputs.push_back( 'c' );
inputs.push_back( 'x' );
  // .. etc

// to see how many elements are in the vector you can check the size:
size_t size = inputs.size();
std::cout << size;  // prints how many elements are in the vector

// can access individual elements by index, starting with 0:
std::cout << inputs[0]; // the first element in the vector
std::cout << inputs[1]; // the second
std::cout << inputs[n]; // the 'n'th
   //.. etc 
@Disch

Thank you! Looks like I have some reading to do haha. Haven't learned about vectors yet!

best!

-mohrchance
Topic archived. No new replies allowed.