thanks Bro you saved me at the night before my exam
@ItzScale Жыл бұрын
Can u pls explain to me why do we use void when we are accepting a string? Or am i stupid and it's not accepting, but returning?
@disabledfabrication Жыл бұрын
the "void" keyword is a RETURN TYPE. In general, let's always assume that all methods have to return something, but in our case, we don't have to return anything, so we would put "void" instead of "int, boolean, double, etc..." Just assume that computer scientists who made this programming language decided to work on this way. To understand this, let's think of a real-life example. Imagine you have a friend's mom who loves to bake cookies. Usually, when your friend's mom bakes cookies, they give you some cookies to eat. But imagine one day your friend's mom tells you, "I'm going to bake some cookies, but I won't be giving you any." In this case, your friend's mom is not returning any cookies to you. In programming, it's similar. The "void" keyword is like your friend saying, "I'm not going to return anything." Instead of using specific types like numbers or true/false, we use "void" to show that the method doesn't need to give anything back. So, when you see "void" in a program, it means that the method doesn't have to return a value. This allows programmers to write methods that perform certain actions without worrying about producing a specific result.
@nguyenquochoa3117 Жыл бұрын
@@disabledfabrication this is a great explanation and good example, thank you i understand it
@FrederikWollert8 ай бұрын
I really like your C++ series. Keep it up. Please make more C++ Videos. So, let's defeat the KZbin algorithm.
@NgJunLiang-s8u9 ай бұрын
Don't understand why previous function "Here is your pizza" will not cout ? is cover already so why delete it for waste space??