if you want the user to input many values to be put in char array, but some of these values maybe short and some maybe long so it won't be great idea to declare array of a big size like: char arr[100]; it would be better to make array like this arr[] and make the user input the values directly to it in a loop so that arr[] size will be changeable according to length of input, this is to be done using a function with a prototype like : void input(char arr[]); the question: is there a way to make the user input the value directly as a function a parameter ?
EDIT : each time the user inputs a value the char array will consist only of this value
i didn't use string at first because i was dealing with numbers but i found suitable conversion now, thanks.
(with char array i was using atof, so i said to myself why wouldn't be there stof :D)