When forward declarations of functions work in a source file (.cpp), why would the same doesn\'t work for classes ?
Thanks.
// main.cpp
void forwar
when you create 2 class & one function can access data from on class to another class then it is a friend function
forword declaration is use to know which class in next
class abc;
class xyz
{
data member;
public:
friend void getdata();
other member function
}
class abc
{
data member
public:
friend void getdata();
}