thatDavidKid
MIS
I am trying to inizialize:
Person:
erson(const char name[], const char phone[])
{}
class Person
{
enum { NAMELEN = 81, PHONELEN = 7 };
protected:
char name[NAMELEN]; // null-terminated string
char phone[PHONELEN]; // *not* null-terminated
};
the thing is that the protected data that i am using is name and phone. It keeps telling me that points and const cant work. i have tried using strncpy, strcpy, neither are working if anyone can help that would be great.
Person:
{}
class Person
{
enum { NAMELEN = 81, PHONELEN = 7 };
protected:
char name[NAMELEN]; // null-terminated string
char phone[PHONELEN]; // *not* null-terminated
};
the thing is that the protected data that i am using is name and phone. It keeps telling me that points and const cant work. i have tried using strncpy, strcpy, neither are working if anyone can help that would be great.