??????????????????????澹�????????????????????????????????????????胁???小??????????澹�?????????澹�??????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;
}