I'm trying to set up two arrays that will store the surname and forename of a person when prompted to enter it. However, because the name could be anything when entered, I don't know what size to make the array. Will I have to do a dynamic array for this, or is there an easier way to do this?
The way I've done it before is based on an example in my text book that tells me that I could do a string as follows:
, which would create an array with 11 objects of type char.Code:char name = "John Smith";
I figured I could do a similar thing that would have the same idea, but that looks like this,
and then have a scanf where the value was entered, but then it won't compile properly.Code:char name;
If you understand my ramblings - please help me!