#include <iostream>
using namespace std;
class a
{
public:
void show()
{
cout << "hello\n";
}
void show2(a A)
{
A.show();
}
};
int main()
{
a A,b;
A.show2(b);
return 0;
}
//first one is using method
#include <iostream>
using namespace std;
class a
{
public:
void show()
{
cout << "hello\n";
}
};
void show2(a A)
{
A.show();
}
int main()
{
a A;
show2(A);
return 0;
}
//this one is using function