>now what is char * exactly?
A pointer to char. Most often, this designates a C-style string where the string is stored in an array of characters and terminated by the '\0' character. Because an array passed to a function degrades to a pointer to the first element, the two functions are equivalent:
Code:
void foo ( char a[] );
void bar ( char *a );
So your constructor is expecting an array of characters terminated by '\0'.
>I would think that there needs to be another variable in there.
In function declarations (but not definitions), the names of parameters can be omitted:
Code:
void foo ( char * ); // Legal!
void foo ( char * ) // Illegal!
{
}
void bar ( char *a ); // Legal
void bar ( char *a ) // Legal
{
}
>Does it mean to just take the information and place it in an array within my class?
Basically, yes.
>how can I incorporate it in the function to do the intended task since it has no variable name?
When you write the definition you'll need to name it:
Code:
Mystring::Mystring(char *str)
{
...
}