16.11.2014 Views

struct point

struct point

struct point

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Копиране на структури<br />

<strong>struct</strong> <strong>point</strong> {<br />

int x;<br />

int y;<br />

};<br />

int main () {<br />

<strong>struct</strong> <strong>point</strong> a, b;<br />

a.x = 10;<br />

a.y = 20;<br />

b = a; //копират се стойностите на всички полета на a в b<br />

//или<br />

b.x = a.x;<br />

b.y = a.y;<br />

//b.x = 10; b.y = 20;<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!