I asked a question here: C++ - class issue
What I'm still not getting is the pointer parameter here:
void setInfo(char *strName,int id,double wage)
Where it is called by:
abder.setInfo("Abder-Rahman",123,400);
I know that the name of the array is a pointer. But, why should we have to have a pointer data type? Cannot we use a char[]
in the function parameter list? As I think I got an error when I tried that.
Thanks.