XX.HEADER
class ABC
{
public:
ABC(); // constructor
int XYZ(int );
int AA;
int m
}
XX.CPP
Mat ABC::XYZ(int c)
{
AA = lambda;
return m;
}
MAIN.CPP
int main()
{
ABC myObject;
int labda = myObject.AA;
}
I want value of AA to be used in main function.
Suppose there is a header file with class definition and member function definition along with some public data members say
AA.
Now in the cpp file for the header file with contain complete description of the header file along with function definition within the class. The data member
AA
contains some value within the member function. Now I want to use this data member AA
in the main function. How can I do that. Right now I have just intialiazed in public: int AA and in function it is giving some integer value which is getting stored. Now I want to use this AA in main function.