Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
So one of the questions that may arise after working with the previous relational operators is what
will happen if we will try to use some mathematical operations on structs.
So we know that if we create some variable, some standard variable income equals two five, we can
write down nonplused plus.
And that's it, it will simply increment the value of number one.
And we can also ride down nonplused equals to three, it will increment the value of number three.
OK, so we can do that for an indigenous floats and so on.
But the question is what will happen?
Let's comment it out simpler.
But the question is what will happen if we will use it on structs?
OK?
Will you use some operations like we've specified previously, like nonplused plus, if we use it on
point, which is a variable of a point type so we can write down point plus plus point b point one,
which is a variable of a point structure.
We can write down point one plus plus, but now at this point, it should be crystal clear to you that
this thing is not supposed to work.
And the reason is very simple, because we write down plus plus, but what do we mean?
Do we actually want to take each of these fields in incremented by one?
Or maybe we want to take just the field into incremented by one?
And what will happen if we have a structure called employee?
And the first field is basically the name of the employee, then what will it mean?
Like Employee Plus Plus?
What will it mean, what field should win criminally, how we should increment basically a field that
is war, basically that is considered to be of a type like a string?
OK, so that's very important to explicitly specify what we want to do.
We cannot write down point B. one point one equals two point two plus three because what is the result
of these evaluation of these terminology?
OK.
So for that, there is also some option that you should at least know for this point, that's just the
basic option that we can use, and it's called to create fonctions kind of associated with these operations.
I know it's not the most elegant way, but it works for now.
It works just fine for you.
So, for example, you want to make an addition between two points.
You want to see point.
Well, let's say point three equals two point one plus point two.
So the way you can do it is simply by using the addition function that you created, and this addition
function will receive point B one and point B to both of them.
You want to you add together to create the point result and then you simply go over field by field or
basically by the fields that you are interested in.
Maybe other fields simply copy them.
OK.
If the are not part of this addition, I'm just using basic addition.
And finally, once you create these point result, you return it.
OK, so that's one way to solve it.
Another option, basically another function will be to use the increment associated.
This was associated with the operation of, let's say, additions, right?
Instead of additions, we can use the addition function instead of these operator, or we can use addition
function between two points to get the added result.
Again, we can also use it for kind of simulating the increment operator.
So we will send the actual address of a certain point and we will be able to access these fields and
to add them by one, to increment them by one, both X and Y.
And if these structure have additional fields, then we would have to decide what fields should be implemented
and what not.
That's why this thing does not work.
But if we will call these functions from here, like increment here, we can use it increment increment
and send what send the address of point B one.
Then this.
Should do the work.
We will get these peace a point to point you to will point to these point one, and then we will simply
increment the values by one of these actual point one.
So after this line, what we will have is basically point one with the values of two and three.
OK.
And if we wanted to create some new value point three, OK, let's say something like that point.
Point three.
And let's say it should be equal to point one loss.
Point to OK, instead of writing it this way, could his addition of points and then specify point one
and point to.
And that should be.
Good.
OK.
So I hope that's clear.
Let's also just copy it and save it so that we will have these codes right here.
Come on, come on.
Come on.
That's what we had and.
That's what we propose.
Awesome.
So, yeah.
So this is it, guys.
Thank you so much for watching.
Let's move on with the material now that you were filling.
Hopefully more confident and more believing in yourself and your skills is program here.
Good luck.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.