C++?????????????δ??????????濪??
???????????? ???????[ 2015/1/4 13:36:30 ] ????????C++ net
????//???????????к??????????濪??????????ζ????????????θ?????????????
????//Ч????????t????£?????????????????????·
????//????????γ????о?????????????????????л??д????
????//?????????????????
#include <iostream>
using namespace std;
class demo
{
public:
demo();
demo(int a);
demo(const demo& tmp);
~demo();
const demo& add(const demo & a?? const demo& b);
const demo * constoperator+(const demo & tmp);
void set(int a);
int get()const;
private:
int x;
};
int main()
{
demo fta(5)??ftb(6);
const demo * const fts =fta + ftb;
cout<< "ADD:"<< fts->get()<< endl;
return 0;
}
demo::demo()
{
cout<< "Original constructorrunning... ";
cout<< x <<endl;
}
demo::demo(int a)
{
x = a;
cout<< "Set value constructorrunning...
";
}
demo::demo(const demo & tmp)
{
this->x =tmp.x;
cout<< "Copy constructorrunning... ";
cout<< x <<endl;
}
demo::~demo()
{
cout<< "Destructor running...
";
}
const demo & demo::add(const demo& a?? const demo & b)
{
this->x =a.x + b.x;
cout<< "Two objects...
";
return *this;
}
const demo * const demo::operator+(const demo& tmp)
{
cout<< "Direct memory address accessmode?? no objects will be copied.
";
this->x =this->x + tmp.x;
return this;
}
void demo::set(int a)
{
x = a;
}
int demo::get()const
{
return x;
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??C++????????????C++ lvalue??rvalueC++11????????C++???????????????C++?е?????????????????C++?????????C++???Windows????λ??C/C++???????????????????JAVA??C??C++??????????c++??python???????????????????????????????C++???????C++?е????????C++????????????????C++ ???????????????C++?????????????????????C++????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????