#include<iostream.h>
struct com
{
int image;
int real;
};
void fun(com *p)
{
cin>>p->image>>p->real;
cout<image<<" "<real<<endl;
}
int main()
{
com k={};
fun(&k);
return 0;
}
C++结构体指针输出数据
最新推荐文章于 2022-03-16 21:32:47 发布
#include<iostream.h>
struct com
{
int image;
int real;
};
void fun(com *p)
{
cin>>p->image>>p->real;
cout<image<<" "<real<<endl;
}
int main()
{
com k={};
fun(&k);
return 0;
}