.


:




:

































 

 

 

 





, -. , , - . :

if (strcmp(first_book. name, Mitchel M.) == 0).

if(first_book. year%4==0)

first_book. name[0] = lower(first_book. name[0]);

 

strcpy (first_book. name, Mitchel M.); //- !!!!!

strcpy (first_book. title, Unesennie vetrom);

cin >> child_book.title; //- !!!!!

first_book. year = 2007;

cin >> first_book. price;

.

( ) . . :

struct { int a;

int b;

} v1, v2;

if ((v1. a == v2. a) && (v1. b == v2. b)) cout << ;

, , .!!! . :

first_book = child_book;

first_book = child_book = dog_book;

!!! windows.h RECT, Rectangle:

#include <windows.h>

RECT r1, r2 = { 2, 6, 4, 2 }, r3;

r1.left = 1;

r1.top = 5;

r1.right = 3;

r1.bottom = 1;

r3 = r1;

cout<< r3.left << endl;

 

, , , , , . .

!!! - . -, , . !!!

 

( ):

struct A { B *pb;};

struct B { A *pa;};

 

:

struct B; // B;

struct A { B *pb;};

struct B { A *pa;};

 

B A, pb B B.

 

. .

(*ptr_date).year year , ptr_date. , (.) , (*).

: p->q->mem, ( p->q ) -> mem ( -> . ). ,
stud. birthdate. month (stud. birthdate). month.

 

data, (, , ), masha_data sasha_data :

struct data

{

int year; //

unsigned mes; //

unsigned day; //

};

data masha_data, sasha_data;

 

:

masha_data. day //

sasha_data. year //

 

masha_data ( ),

sasha_data ( ).

person_data:

data person_data [20];

:

person_data ( );

person_data[i] (i+1) (i );

person_data[i]. mes (i+1) ;

( ) mash : , , .

struct Auto

{int nomer; //

char marka[20]; //

char fio[40]; //

char adres[60] //

};

Auto mers, volvo, alfa_r [5], *mazda,person_list [20]; //

mers.marka mers

mers mers

volvo.fio[0] volvo

alfa_r [1].adres[0] alfa_r

person_list ( );

person_list[i] (i+1) (i );

person_list[i].fio (i+1) ;

person_list[i].fio[j] j- (i+1)

:

person_list
1- : person_ list [0] 2- : person_list [1] i- : person_list [i-1] ... 20- : person_list [19]
nomer(4 ) marka(20 ) fio(40 ) adres(60 )   nomer marka Adres Adre s adres     nomer marka fio adres   O

person_list [1]. fio person_list [i-1].fio[j]

:

struct { char name[20];

char title[44];

int year;

float price;

} books[25];

year i- books :

books[i].year =2007;

(*(books+i)).year =2007;

(books+i)->year =2007;

 





:


: 2016-10-06; !; : 320 |


:

:

, .
==> ...

1746 - | 1572 -


© 2015-2024 lektsii.org - -

: 0.016 .