class function that generates its own objects
- by honeybadger
I want to write a class for some use. I want to call a function (say generate) of this class which will generate two objects of this same class. These two objects will call other function of the class.
Can anyone tell me how to do this?
I want it in C++
Class Example{
public:
generate();
other_func();
}
int main()
{
Example generate();
}
Now this generate function should create two object of Example and will call other_func();