最新回答 / qq_帶著時(shí)光去旅行_0
void是無類型,get因?yàn)橐@取這個(gè)內(nèi)容所以要確定這個(gè)內(nèi)容的類型?如果獲取的是數(shù)字就是Int了.
2019-12-01
最新回答 / KellyCayne
不一定是string型,看函數(shù)最后返回的數(shù)據(jù)類型,如果返回的是int數(shù)據(jù),則get函數(shù)是int類型,只有g(shù)et函數(shù)返回string型的數(shù)據(jù)時(shí),它才是string類型
2019-11-06
最新回答 / 小御姐
Student stu1;Student stu3(stu1);//調(diào)用拷貝重載函數(shù),該語(yǔ)句的效果相當(dāng)于Student stu3
2019-10-22
最新回答 / tangl666
#include<iostream>#include<string.h>using namespace std;class Gun{?? ?public:?? ??? ?string type;?? ??? ?int ATK;?? ??? ?int GunCapacity;?? ??? ?int NowCapacity;?? ???? int?? ?Surplus;?? ? // or residue};int main(void){?? ?Gun *p = new Gun();?...
2019-09-27
最新回答 / weixin_慕絲3553261
這兩個(gè)函數(shù),只是在創(chuàng)建對(duì)象時(shí) 自動(dòng)調(diào)用的,里面的內(nèi)容,你可以自己定義,但是,無論里面有沒有內(nèi)容,它都會(huì)在對(duì)象被創(chuàng)建時(shí)自動(dòng)調(diào)用。有內(nèi)容,他就在對(duì)象被創(chuàng)建時(shí)去執(zhí)行。
2019-09-15