<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[m0_72473797的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/m0_72473797</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; m0_72473797]]></copyright><item><title><![CDATA[C++面向对象程序设计 openjudge-004 神秘的数组初始化]]></title><link>https://blog.youkuaiyun.com/m0_72473797/article/details/129649759</link><guid>https://blog.youkuaiyun.com/m0_72473797/article/details/129649759</guid><author>m0_72473797</author><pubDate>Sun, 19 Mar 2023 13:31:23 +0800</pubDate><description><![CDATA[【代码】C++面向对象程序设计 openjudge-004 神秘的数组初始化。]]></description><category></category></item><item><title><![CDATA[C++面向对象程序设计 openjudge-003 好怪异的返回值]]></title><link>https://blog.youkuaiyun.com/m0_72473797/article/details/129648962</link><guid>https://blog.youkuaiyun.com/m0_72473797/article/details/129648962</guid><author>m0_72473797</author><pubDate>Sun, 19 Mar 2023 12:24:12 +0800</pubDate><description><![CDATA[2.error:ambiguating new declaration of 'int getElemrnt(int*,int)' （函数前后类型不一致，“有歧义”）1.error：Ivalue required as left operand of assignment(左值应该是左值）（此处报错） getElement(a,1) = 10;（注意：加在getElement前即可哦）填空，使得程序输出指定结果。]]></description><category></category></item><item><title><![CDATA[C++面向对象程序设计 openjudge002- 难一点的swap]]></title><link>https://blog.youkuaiyun.com/m0_72473797/article/details/129648586</link><guid>https://blog.youkuaiyun.com/m0_72473797/article/details/129648586</guid><author>m0_72473797</author><pubDate>Sun, 19 Mar 2023 11:47:52 +0800</pubDate><description><![CDATA[【代码】C++面向对象程序设计 openjudge002- 难一点的swap。]]></description><category></category></item><item><title><![CDATA[C++面向对象程序设计 openjudge-001 简单的swap]]></title><link>https://blog.youkuaiyun.com/m0_72473797/article/details/129648477</link><guid>https://blog.youkuaiyun.com/m0_72473797/article/details/129648477</guid><author>m0_72473797</author><pubDate>Sun, 19 Mar 2023 11:41:38 +0800</pubDate><description><![CDATA[#include &lt;iostream&gt;
using namespace std;
class A
{
	public:
	int x;
	int getX() { return x; }	
};
void swap(
// 在此处补充你的代码
)
{
	int  tmp = a.x;
	a.x = b.x;
	b.x = tmp;
}
int main()
{
	A a,b;
	a.x = 3;
	b.x = 5;
	swap(a,b);
	cout &lt;&lt; a.getX() &lt]]></description><category></category></item></channel></rss>