Problem with class

Hello ,
I can't understand "char *str"!!!
plz help me!
1
2
3
4
5
class samp{
char s[80];
public:
void set (char *str){strcpy(s,str)}
};
set is a method. It takes one argument of type char*. That is a pointer to a char. It is meant to point to the first character of a string. This is the information a function needs to deal with a null terminated string. What else should I tell you?
See http://www.cplusplus.com/doc/tutorial/ntcs/ and http://www.cplusplus.com/doc/tutorial/pointers/ I guess.
Last edited on
tanx alot!!!
Topic archived. No new replies allowed.