At: http://www.learncpp.com/cpp-tutorial/82-classes-and-class-members/
There is the following program (I made some small modifications):
#include
1.
strncpy(m_strName,strName,25);
You need to #include (where strncpy is declared).
2.
std::cout<<"Name: "<
should be
3.
void setInfo(char *strName,int id,double wage)
can be set to
void setInfo(const char *strName,int id,double wage)
to get rid of the g++ 4.x.x warning.