C?????н??????????÷???
???????????? ???????[ 2012/11/13 11:34:38 ] ????????
??????????壿
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????С????????
??????????????struct???η??????磺
????C++ ????
struct test
{
??float a;
??int b;
};
??????????????????????test????壬??????????????test???????????????a??b?????a?????????????????????b????????????????
??????????屾????????????????????????????????????????????????????????
test pn1;
???????????????test???????????????????pn1??????????????????????????С?
????pn1.a=10 ????????pn1????a??????????????
?????????????????????????????????????е???????????????????????????????????????????檔
???????壬?????????????????????????????????
????????????->??????????????????????????????????????????????
????C++ ????
//???????:????
//???и?????а?????????????????????????????
#include
#include
usingnamespacestd;
structtest//??????????test?????
voidmain()
??pn2.a=10;//????????????.?????????pn2?е???a???
??pn1=pn2;//??pn2?????е??????????????????????????pn1
??point=&pn2;//????????????pn2???????
??????????????????????鯔?????????????????????????????????е??Щ?????????
{
??inta;//?????????a
??intb;//?????????b
};
{
??testpn1;//??????????pn1
??testpn2;//??????????pn2
??pn2.b=3;//????????????.?????????pn2?е???b???
??cout<??cout<
??test*point;//????????
??cout<??point->a=99;//?????????????????pn2???a???
??cout<??cout }
??????
???·???
??????????????????
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