#ifndef PERSON_H
#define PERSON_H
#include <string>
class person {
public:
/** Default constructor */
person();
/** Another constructor */
person(std::string ,std::string, int,bool, std::string[]);
/** Default destructor */
virtual ~person();
private:
std::string m_nickname; //!< Member variable "m_nickname"
std::string m_fullname; //!< Member variable "m_fullname"
unsignedint m_age; //!< Member variable "m_age"
bool m_sex; //!< Member variable "m_sex"
std::string m_hobbies[10]; //!< Member variable "m_hobbies"
};
#endif // PERSON_H
I think there is no problem, but here I do, the error says "error: expected ',' or '...' before 'hobbies'"
Also How do I initialize m_hobbies to be NULL?
This si the .cpp
Hey, Im getting a new error, it says "error: incompatible types in assignment of 'std::string* {aka std::basic_string<char>*}' to 'std::string [10] {aka std::basic_string<char> [10]}'| " Would you help me?
So Im getting an error when I do this:m_hobbies=hobbies; The error says "incompatible types in assignment of 'std::string* {aka std::basic_string<char>*}' to 'std::string [10] "