0
What are data members and member function
4 Respostas
+ 5
Variables declared within a class preceded by a data type which define the state of an object are called data members, and functions which define the behaviour of an object of that class are called member functions. Eg-
class human{
private:
string name; // data member
int age; // data member
public:
void run(){ }; // member function
void eat(){ }; // member function
};
0
Thank you
0
thanks
0
Super explain ☘️