Hi i have a question about inputting to char*.
For instance,i have made a class "Name",and am passing my constructors in as follows
Name* n1 = new Name("Nelly the elephant");
Name::Name(char* name){
this->name = name;
}
But i am confused as to how i would code my addName().Ideally i would like to add a name into a char* variable and copy it to my Class Name attribute that holds the name but i am confused on the following with char*:
If i begin to enter into a char*,how can i stop entering do i have an unlimited amount of space?
Ideally i would like to stay away from the use of strings and inputting via a for loop.
Thank you for any help.