Functions is very new to me and i cannot understand for what exactly they can be used in any decent program, please someone to take time and answer me whit some good explanation. Thank you
@iiperento its easier to read your code, also makes it more organized. it's kind of like putting in comments in your code. when building more complex programs, it is easier to plan out what each function will do and the combine all the functions together to make a working program. read on the benefits of object oriented programming. although making functions is not the same as object oriented programming, the benefits are similar.
@iTwistar Yes sir i re-read other tutorials too and now i see i can think way better for the program what to do if i have just few functions, making it easyer and yeah as you said more organized. Functions was just very new and couldnt understand them well at the begining but now i see they worth the writing even in the most lame programs! Than you
@iiperento functions are block of statements that are intended to process data and return result...note that functions always return.they are declared with specific data type int fun();
but when we declare as void fun(); then this is a block of data that are used to execute statements...they are like sub procedures in vb
I found a minor discrepancy at 1:25 -- When in the context of a function definition, technically the variables are referred to as "parameters." Only when passing variables into a function (such as when the function is called) are they referred to as "arguments." I'm sure you already know this since it's clear you are well versed in C++, but I just wanted to clarify this for the rest of the viewers. Excellent job on the videos and I love the background music! Cheers...
? Ok, I got about half of that. I'm making progress... it'll take me probably another 4 or 5 run throughs of this entire tutorial series before I an really good at C++, but I'm getting there...
Also, I have that problem where your window closes the moment you run it, and with the same code at 2:12, I'm unsure as to where I should put it. If I put it just before the return: false then it will stay open but no 0 will appear.
@Therifle123 the window closes right away because it run through the entire program. If you press ctrl + F5 then it will run without debugging and for some reason it works this way.
I copied out that exact code at 2:12 but when I tried to run it, it said there were build errors :/ I'm completely new to coding and such and after the previous eleven lessons and this I was slowly figuring out how each bit worked and decided to recreate it.
Programming languages may be different, but the logic behind them is always the same. Once you've learned one language, some of the skill you possess is transferrable when learning other languages since you can learn with the "mind" of a programmer. You've already learned how to think like a robot, and thinking like a robot will make other languages easier to grasp.
Hope that makes sense to you lol. In short, you've "learned how to learn" already, so things become familiar.
@Archlvt But it depends of the language level, i started in C++ continued in pascal, and then the assembler, c++ crossing to pascal was yeasy to grasp cuz they are similar (dont mean the quality ) in syntax, but the assembly is the other coffee :)
I have been reading a number of ebooks about programming in C++ and so far, your videos are the only ones that helped me get a clearer vision of how things work (until now at least)
Thank you very much for these REALLY helpful videos. I`m gonna be following all your tutorials on C++ Beginner, C++ Win32 Apps and C++ OpenGL.
thaks very much...first video i found that actually explains functions.
TheLurz21 1 week ago
Napoleon Dynamite?
scottj19x89 1 month ago
Functions is very new to me and i cannot understand for what exactly they can be used in any decent program, please someone to take time and answer me whit some good explanation. Thank you
iiperento 4 months ago
@iiperento its easier to read your code, also makes it more organized. it's kind of like putting in comments in your code. when building more complex programs, it is easier to plan out what each function will do and the combine all the functions together to make a working program. read on the benefits of object oriented programming. although making functions is not the same as object oriented programming, the benefits are similar.
hope that made sense :)
iTwistar 4 months ago
@iTwistar Yes sir i re-read other tutorials too and now i see i can think way better for the program what to do if i have just few functions, making it easyer and yeah as you said more organized. Functions was just very new and couldnt understand them well at the begining but now i see they worth the writing even in the most lame programs! Than you
iiperento 4 months ago
@iiperento functions are block of statements that are intended to process data and return result...note that functions always return.they are declared with specific data type int fun();
but when we declare as void fun(); then this is a block of data that are used to execute statements...they are like sub procedures in vb
bipinbhandari 1 month ago
Why are we using void main instead of int main? Apparantly, void main is "illegal" to most programmers since it doesn't need a return value...
NeatStuff4iTouch 9 months ago
can someone please explain to me step by step the code on 2:12 ?
its working perfectly but i honestly dont understand it.
barzelas 10 months ago
Did you use Herbert Shichidt's book
tanvir791 10 months ago
I found a minor discrepancy at 1:25 -- When in the context of a function definition, technically the variables are referred to as "parameters." Only when passing variables into a function (such as when the function is called) are they referred to as "arguments." I'm sure you already know this since it's clear you are well versed in C++, but I just wanted to clarify this for the rest of the viewers. Excellent job on the videos and I love the background music! Cheers...
amisner2k 11 months ago
@amisner2k fool
tanvir791 10 months ago
holy crap this guy makes my c++ teacher look like an idiot.
immortal4942 1 year ago 4
I feel like this is the most difficult lesson so far.
ls3inchem 1 year ago 3
? Ok, I got about half of that. I'm making progress... it'll take me probably another 4 or 5 run throughs of this entire tutorial series before I an really good at C++, but I'm getting there...
GeekingForJesus 1 year ago
Nevermind, I missed that final bracket.
Also, I have that problem where your window closes the moment you run it, and with the same code at 2:12, I'm unsure as to where I should put it. If I put it just before the return: false then it will stay open but no 0 will appear.
Therifle123 1 year ago
@Therifle123 the window closes right away because it run through the entire program. If you press ctrl + F5 then it will run without debugging and for some reason it works this way.
coldturkey160 11 months ago
I copied out that exact code at 2:12 but when I tried to run it, it said there were build errors :/ I'm completely new to coding and such and after the previous eleven lessons and this I was slowly figuring out how each bit worked and decided to recreate it.
Therifle123 1 year ago
just a question, should it always be int main()
thats is atleast what ive heard. and void main() dont work in codeblocks for me..
also i like to do
{
}
instead of {
}
since it looks way more clean
Necry3d 1 year ago
Great stuff, I imagine Frank Zappa giving this tutorial... lol just kid thanks for the lesson.
wagtec 1 year ago
@paperfreeck
!VERY means "not Very", you know ;)
xMAC94x 1 year ago
thanks
KAKA2222KAKA 1 year ago
Can anybody tell how 2 use boolean thx
XenonXero 1 year ago
@XenonXero
function:
bool AmICool()
{ return true;
}
variable:
bool bIsthisInYoutube = true;
howitzer24 1 year ago
Xoaxdotnet, is your last name Bantle? Because you sound exactly like someone I know.
Nicro327 1 year ago
how much knowledge of C++ is needed to program with win32?
NotRegret 1 year ago
Thanks for everything you've done for the youtube community. u helped me tons so far
Grandboy3000 1 year ago
i just learned php and a lot of the pattern seem just like it.. great videos btw
gonzalezluis78 2 years ago
Programming languages may be different, but the logic behind them is always the same. Once you've learned one language, some of the skill you possess is transferrable when learning other languages since you can learn with the "mind" of a programmer. You've already learned how to think like a robot, and thinking like a robot will make other languages easier to grasp.
Hope that makes sense to you lol. In short, you've "learned how to learn" already, so things become familiar.
Archlvt 2 years ago 39
@Archlvt so true man
krechlich 11 months ago
@Archlvt But it depends of the language level, i started in C++ continued in pascal, and then the assembler, c++ crossing to pascal was yeasy to grasp cuz they are similar (dont mean the quality ) in syntax, but the assembly is the other coffee :)
LightingScythe 2 weeks ago
Usefull, but !VERY! annoing music.
paperfreeck 2 years ago 5
that´s right xDD
TheCrusadex 2 years ago
!very = not very?
bryanj12341 2 years ago
!very seams ok for me
paperfreeck 2 years ago
haha lol
Grandboy3000 1 year ago
@paperfreeck Love the music! Keep it in!
n8style 1 year ago 4
I have been reading a number of ebooks about programming in C++ and so far, your videos are the only ones that helped me get a clearer vision of how things work (until now at least)
Thank you very much for these REALLY helpful videos. I`m gonna be following all your tutorials on C++ Beginner, C++ Win32 Apps and C++ OpenGL.
djsotos 2 years ago 2
This is very useful thanks.
Brudof 2 years ago 17