io1.1和ie3.0哪个大:#include<iostream.h>
来源:百度文库 编辑:高考问答 时间:2024/04/28 04:54:58
#include<iostream.h>
class Example
{
friend void call();
Example(int y)
{
x=y;
}
private:
int x;
}
class Another
{
vall()
{
Example f;
cout<<"the another's x is:"<<f.x<<endl;
}
};
class Another2
{
vall()
{
Example f;
cout<<"the another2's x is:"<<f.x<<endl;
}
};
int main()
{
Example e(3);
Another a;
Another2 a2;
cout<<"the Example's x is:"<<endl<<e.x<<endl;
cout<<a.call()<<endl;
cout<<a2.call()<<endl;
cout<<endl;
}
class Example
{
friend void call();
Example(int y)
{
x=y;
}
private:
int x;
}
class Another
{
vall()
{
Example f;
cout<<"the another's x is:"<<f.x<<endl;
}
};
class Another2
{
vall()
{
Example f;
cout<<"the another2's x is:"<<f.x<<endl;
}
};
int main()
{
Example e(3);
Another a;
Another2 a2;
cout<<"the Example's x is:"<<endl<<e.x<<endl;
cout<<a.call()<<endl;
cout<<a2.call()<<endl;
cout<<endl;
}
???
不是用C语言写的吧,我只会一点点C语言,不过请你写好你的问题而不要让我们来猜