samedi 14 septembre 2019

What does the following C++ marked code does?

I wonder what does the line which marked "This line" means and what happens to P(struct) after this operation? #include<bits/stdc++.h> using namespace std; struct P { int x,d,u,val ; }a[10]; int main() { int n ; scanf("%d",&n) ; for(int i=0;i<n;i++) { int x1,y1,x2,y2 ; scanf("%d%d%d%d",&x1,&x2,&y1,&y2) ; **a[1]=(P){x1,y1,y2-1,1} ;** // <--- This Line } return 0; }

Aucun commentaire:

Enregistrer un commentaire