I would like to create an array in C which dynamically grows and stores string .And would like to point that array by an pointer . How can I do it? Any suggestions will be highly appreciated.The flow of program that i want to make is as follows:
program takes input say int i =5;
create an string array of length 5
insert the string into the array.
suppose x1,x2,x3,x4,x5
and i want that array to be pointed by the const char pointer
[EDIT]
here i would like to make my problem more clear. I will take input as a number of symbols that i have to store. If i take input as 5 , then my program has to genearate five symbol and it has to be stored into array and then that array should be pointed by the pointer.
How i am approaching is:
I am taking array of pointers. Each pointer will point to the string with two element. The first element will remain same for all. The next element in the every iteration has to increase by one and has to endup with the input i, i had taken earlier.My problem has be storing the counter value as character.
I am not so used with C.Expecting some help.
Thanks