Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by kace ( 14 years ago )
#include <iostream>
#include <conio.h>
using namespace std;
class B;
class A
{
public:
A(B);
};
class B
{
int b;
public:
B(int n):b(n){};
friend A::A(B);
};
A::A(B obj)
{
cout << obj.b;
}
int main()
{
A objA(B(2));
getch();
return 0;
}
Revise this Paste