Hi everyone,
I need to declare an array of chars but I don't know how big it will be from the start of the program.
example:
Someone gives me a name:
John
Array gets filled with john
[j][o][h][n]
so the size of this array is 4 chars (not more)!
how can I declare an array that way?
I tried: char tablename[] but that doesn't seem to work.
Thanks in advance!!
I need to declare an array of chars but I don't know how big it will be from the start of the program.
example:
Someone gives me a name:
John
Array gets filled with john
[j][o][h][n]
so the size of this array is 4 chars (not more)!
how can I declare an array that way?
I tried: char tablename[] but that doesn't seem to work.
Thanks in advance!!
Comment