About Visual Studio C4700 error,what is the error in this code??

  • Thread starter Thread starter Ali hamzadchsdjfhsdhfhsdjshfjsdhjfhsjfs sg gfsgsdg
  • Start date Start date
A

Ali hamzadchsdjfhsdhfhsdjshfjsdhjfhsjfs sg gfsgsdg

Guest
#include <iostream>
using namespace std;
class abc
{
private:
int x;
public:
friend void man(abc);
void seta();
};
void abc::seta()
{
x = 3;
cout << x;
}
class b:public abc
{
protected:
int y;
public:
void setb();
};
void b::setb()
{
y = 2;
cout << y;
}
int main()
{
abc obj;
b f;
f.seta();
f.setb();
man(obj);
system("pause");
}
void man(abc g)
{
g.x = 2;
cout << g.x;
}

Continue reading...
 
Back
Top