#include<bits/stdc++.h>
using namespace std;
typedef struct stu{
int score;
string name;
}S;
typedef struct book{
char title[50];
char author[50];
}B;
void bk(B *bk){
cout<<"bk1's tile: "<<bk->title<<endl;
cout<<"bk1's author: "<<bk->author<<endl;
}
int main(){
S stu1;
stu1.score=99;
stu1.name="zhangsan";
cout<<"stu1's score:"<<stu1.score<<endl;
cout<<"stu1's name:"<<stu1.name<<endl;
int *p;
int p1;
int& p2=p1;
p1=2;
p=&p1;
cout<<" p:"<<p<<endl;
cout<<"*p:"<<*p<<endl;
cout<<"p1:"<<p1<<endl;
cout<<"p2:"<<p2<<endl;
B bk1,bk2;
strcpy(bk1.title,"《C++程序设计》");
strcpy(bk1.author,"李四");
bk(&bk1);
return 0;
}
06-14
120
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-08
336
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-13
587
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)