C++????????????????????
???????????? ???????[ 2016/12/5 15:13:39 ] ??????????????????? C++
??????????????????????澹�????????????????????????????????????????胁???小??????????澹�?????????澹�??????public?????????????private????
????????????????????????????public??????????鈥�?????????????谐??????
???????
?????? ????????????????????????????????
?????? 未?????????????????????????????????
?????? ?????????????????????????????????public??
?????? ?????????????????????胁????写?魏喂?????
struct S { //class S 效?????
int x;
unsigned short y;
};
S testS1={100??123};
S testS2={200};//未????????????????????????????os2.y=0;
S TestS[4]={ {100??10}??
{200??20}??
{300} };//未?????????????????os[2].y??os[3].x??os[3].y??
??????????????????private??protected????????????????????????霉??????????谐??????
struct S { //class S?????????椋�??????
private:
int x;
public:
double y;
S(void){}
S(int idemo??double ddemo) {x=idemo;y=ddemo;}
void show(void) {cout<<x<<''/t''<<y<<endl;}
};
S os1;//??????????????(??喂?????)
S os2(1000??2.345);
S os3=S(2000??4.567);
S os[4]={S(10??1.234)??S(20??2.234)};//未???????????????????????????????????????????
??????????:
?????? ??S os3=S(2000??4.567);????校????????????????os3?????????????S(int??double)????????os3???谐??????
?????? S os3(2000??4.567); ????? S os3=S(2000??4.567);
?????? ?????os3??????????S os3(100??1.234);os3=S(2000??4.567)?????????????????????os3????????operator=?????????????????????????????????=??????????????????????????????????械????????小?
??????????????????????????????????????????????
??????????????锟�?
#include <iostream>
using namespace std;
class C {
private:
int x;
public:
C(int idemo) {x=idemo;}
void show(void) {cout<<x<<endl;}
};
struct S {
private:
int x;
public:
S(int idemo) {x=idemo;}
void show(void) {cout<<x<<endl;}
};
int main(int argc?? char *argv[]){
C oc=1000;//??????????????
oc.show();
S os=2000;//??????????????
os.show();
return EXIT_SUCCESS;
}
??????

???路???
??????????????????
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