class Rectangle {
private:
int num;
public:
int method1(int,int);
}classOne;
int Rectangle::method1(int num1,int num2)
{
classOne.num = (num1 * num2);
return (classOne.num);
}
int main()
{
Rectangle* one = new Rectangle();
cout << (one->method1(2,10));
NewClass* newClassPointer = new NewClass();
//I want to access NewClass here....
}
NewClass::NewClass()
{
method1();
}
void method1()
{
cout << "in NewClass";
}
};
I have another added another class in to the project, in a seperate file, but I cannot seem to access this class from my code??
I think I have added a constructor in NewClass and would like to call this constructor to call method1 in turn from Rectangle.
Any help please???