进程交换
2019-07-14 10:41发布
生成海报
#include
#include
using namespace std;
struct PCB
{
int ID;
int jj;
int dx;
string jx;
bool hs;
};
struct PCB A[5],t;
void swap(Player *a,Player *b);
int A_ID[5];
void main()
{
p1.name = "han";
p1.age = 28;
p1.height = 186;
p2.name = "wang";
p2.age = 26;
p2.height = 178;
Player *pp1 = &p1;
Player *pp2 = &p2;
swap(pp1,pp2);
cout<0].ID=1;
A[0].jj=1;
A[0].dx=3;
A[0].hs=true;
A[0].jx="123";
A[1].ID=20;
A[1].dx=21;
A[1].hs=true;
A[1].jj=12;
A[1].jx="2662ss";
A[2].ID=300;
A[2].dx=123;
A[2].hs=true;
A[2].jj=56;
A[2].jx="56122d";
}
void swap(Player *a,Player *b)
{
Player temp;
temp = *a;
*a = *b;
*b = temp;
}
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮