@Molbs100 I regret not learning programming languages when i was younger. I didn't know anything about it until my 1st year engineering class, now I'm hooked haha. Good luck with the rest of C++.
@SimpleCookiee12 жыл бұрын
I told my GF bucky seems very smart, when he talks he explain everything in a way like he really thought it through already on how to explain it and even the more advanced stuff he knows like what the particular libraries does. I also think he's clever. Cuz he knows many programming languages and he done a tutorial on how to make our own gokart
@pandachels595211 жыл бұрын
Just wanna say THANK YOU, since you really saved my life for midterm :)
@asfadasfa123414 жыл бұрын
@daeheadshot int num was a paramater in the answer function. what he did with it was used it as maximum amount of times the for loop could run. he said for(int i=0; i
@CraayC13 жыл бұрын
The confusing thing for me was that he went from bottom to top to middle. Though I recommend people to watch all of it once, then watch all of it again while pausing the video whenever they're confused about something. He does actually explain everything he does - so just pause/replay a lot! Just remembert that "Bucky[]" is the Array ("Numbers") and "num" is the 5 different numbers/variables in the array.
@JesusTwoThousand11 жыл бұрын
Thanks, I passed all of them quite some time ago, and am currently as a programmer. To learn the basics, I never even needed a 30$ book, documentation sufficed.
@sidrocksinthisworld12 жыл бұрын
what BS? this guy is pretty good you know? i learnt everything from a freaking book and didn't get half the things explained in there. he's pretty good at explaining all the concepts of c++ without overwhelming the viewer. give him some credit, wont you?
@BieberFever4evaar12 жыл бұрын
this saved my ass. i have an exam tomorow. thanks !
@ValosTaonas14 жыл бұрын
This is really cool and fun and it IS getting hard. After reviewing the file I made while following this tutorial, I'm still a bit confused but I'm sure I'll get it as I keep learning.
@ddoodm15 жыл бұрын
Yes! Finally another Cpp tutorial!!! :D Thanks Bucky! You rock!!!
@nitin151814 жыл бұрын
@hamadrehman: fstream is used to operate on the file you will be using to read and write. cstlib C Standard General Utilities Library This header defines several general purpose functions, including dynamic memory management, random number generation, communication with the environment, integer arithmetic, searching, sorting and converting.
@dmdrummer2314 жыл бұрын
@Molbs100 I felt the same way in some of my C++ classes, but it will eventually click and make perfect sense. And it is really hard to teach something like programming once you understand it (like trying to tell someone how to drive a standard car). It all seems easy to him now, so it's hard to tell what people will have trouble with. I'd be glad to help with any specific questions (and bucky has a forum too).
@TheWhizzkiduk15 жыл бұрын
I agree, everything was so clearly explained on the previous videos but as these progressed its way to fast, i keep having to stop it and reference stuff on websites, no problem though, when i do eventually understand it'll be good to come back and see it action
@bondservant4Him12 жыл бұрын
You dont need to return an array. The array is passed by reference so the changes reflect back to main, therefore there is no need to return an array :)
@fuel-pcbox15 жыл бұрын
Interesting! Keep it up, dude!
@krepost331915 жыл бұрын
Спасибо за работу! Так держать! Thanks )
@FtaAl3rab13 жыл бұрын
Thank you dude your tutorials are very helpfull I'm following all of them and wonder where i was from them ..... i dont know why most comments are saying that u are fast ..???
The function that you can try using is: sizeof() This works in C++ as well as C.
@krissi001315 жыл бұрын
For those who are having trouble grasping this, try back tracing from the final results. the "total"
@bondservant4Him12 жыл бұрын
If you pass an array to a function and you make changes to that array in the function. Then when the function is finished your array in main will be changed. So therefore there is really no need to return an array.
@devengovender10111 жыл бұрын
It takes all the elements in the array numbers[] which is actually passed on as bucky[] and adds all the elements and store it as sum.
@shiinondogewalker167512 жыл бұрын
Yes! but you will need fast fingers to do all calculations needed in a game or something ^^
@dmdrummer2314 жыл бұрын
@acollsen i would say learn C++/C (and maybe Java too) first, and then you will learn other languages much faster. There is no 'best' language, it depends on preference and application. I think C++ is more difficult, but very efficient and good for games.
@varan959512 жыл бұрын
"make sure you have a couple of typos in there" lmao
@MortazaHussein12 жыл бұрын
thank you very much , it helps me well
@hewgouw14 жыл бұрын
@johnnyc130 no, "int numbers[5]" have 5 elements, 0, 1, 2, 3 and 4
@acollsen14 жыл бұрын
A question. People say that C++ is the best language. But I want to know why. I have a hard time choosing what language to learn more about. I tried this in both Python and in C++ and python seems more easy to understand. What is good and what is bad with C++ and Python? Please respond. Here is my code for this in Python: arr = [13, 45, 3, 765, 44] def Calc(array): summa = 0 for i in array: summa += i return summa print "The sum of the array is:", Calc(arr)
@audiocorps233412 жыл бұрын
My professor is really against the use of ++, --, +=, -=, /=, etc. Said this was during the time where we had less memory... Is it really a bad idea to use these, or just the incre/decre-mentals? It seems more convenient and less cluttering if I just used those...
@chendo229914 жыл бұрын
First one i had to actually go over to fully understand lol
@DzahierulAliemy4 жыл бұрын
Thank you very much sir.
@MattCoffey693312 жыл бұрын
When I run the program(after I compiled it) it gives me this error: "Segmentation fault (core dumped) " any ideas?
@manishsakariya459511 жыл бұрын
nice bro... keep it up....
@bondservant4Him13 жыл бұрын
@Pradipna so doesnt that mean the array is always passed by reference?
@bundeligafan14 жыл бұрын
we can simply say cout
@Aggregate0215 жыл бұрын
Yeah, but you can create a simple function using the sizeof() function and divide it by the size of the variable type.
@bondservant4Him12 жыл бұрын
an array is already a pointer to the first element. It can be confusing, I find the best way to understand it is to do some practice code and see what works and what doesnt then it will become more obvious to you. If you have any code you have questions on, PM me it and ill try and explain my best.
@dominicjan14 жыл бұрын
i did'nt get the "int i" part but it appears its allowed to declare variables in the loop. also i forgot how the FOR loop works - had to revise that. the ride is getting bumpier and bumpier.
@Ubokhalid11 жыл бұрын
aray
@leviterande15 жыл бұрын
Hi I have one question and I am in college. the I am in course supposes to be for total newbie beginners in C. my question is, is it normal to already after 3 weeks from the start we are studying adding matrixes and arrays together in other functions.. we have covered too many things and we took loops the second week...
@JesusTwoThousand12 жыл бұрын
Because I wish you well.
@bondservant4Him13 жыл бұрын
@Pradipna so why would anyone pass a pointer to the array if its already a pointer, is there a reason?
@h43442112 жыл бұрын
Im confused about something, when he made the array big enough for 5 integers. I thought that it actually started at 0 so wouldn't it actually be big enough for 6 integers?
@kasper344211 жыл бұрын
You need to input an array as you've declared in the body of your function.
@alberthuynh12 жыл бұрын
bucky always say he will get a bunch of errors but never does lol
@Jamiewinters811 жыл бұрын
could you type int total=answer({4,5,6,7,8},5); ? or do you need to do something special to enter an array without setting it to a variable?
@04azey13 жыл бұрын
How can i write a C application that allows users to perform 2 basic Matrix operations in the form of functions
@FrankLopezx9 жыл бұрын
im not sure but i dont think bucky should off teach this backwards? start on the top and work your way to the bottom of the loop, cuz when he starts in loop and work his was up i get lost as im still trying to understand the logic behind passing a function with variables not mentioned yet as they are part of a int main() and then im thinking how do i pass this in a setup() in Arduino and i get lost
@lvj85199 жыл бұрын
Question: instead of "int total=answer(numbers, 5);" ..... re: 2nd line in the main function, I used (numbers,1), and it showed the number four (4). It appears that the rule that arrays start with the number zero(0) does not apply in this case, and such rule is merely a general rule with exceptions?
@crateer6 жыл бұрын
Wrong.
@SimpleCookiee12 жыл бұрын
Figured it out already
@talkingfractal15 жыл бұрын
Is there something similar to python for c++ when checking for the length of an list/array ? python: len(list) c++: ???
@GianLazaro9311 жыл бұрын
Since C++ converts any arrays passed to a function a pointer, why not just use pointers as arguments?
@kurmakk14 жыл бұрын
@coolguyace took me a couple reviews of previous vids to understand this one....least i kno i wasnt alone in not understanding!
@HarshPrriyaOfficial13 жыл бұрын
Can we also pass the reference of an array into a function?
@Desiqnify7 жыл бұрын
what if you want to return an array pointer? How would you call that to the method?
@FrankLopezx9 жыл бұрын
this is nice and all but how do you pass this functions over wireless in another platform? "Arduino"
@SimpleCookiee12 жыл бұрын
Btw.. I don't understand the purpose of the variable "num" in this video.. It doesn't make much sense to me. Could someone explain to me it's purpose? How it works
@HawxTeamDelta14 жыл бұрын
hey bucky why you didnt remove the name of your parameter in the prototype you made? that made me confuse although i think i get it but it'll be more better for me if i get an explanation for that..
@shapbrain13 жыл бұрын
Bucky, can u please solve the following problem using c++ 1)Write a function that accepts an array of non-negative integers and returns the second largest integer in the array. Return -1 if there is no second largest. You may assume that the input array has no negative values in it. Thanks in advance :D
@chernobila15 жыл бұрын
hello sir are you going to post more C++ tutorials? Please do Thank you
@jezzie735411 жыл бұрын
u rock!
@jakobskof13 жыл бұрын
i have gat a problem ISO C++ forbids comparison between pointer and integer i dont now why
@LPSlasher14 жыл бұрын
BE AWARE! (lol) If you try this and somehow it gives you a number with comma or in any way NOT an ENTIRE number, you'll have to use 'double' instead of 'int' (int stands for entire numbers ONLY, double stands for both)
@danfebra101610 жыл бұрын
i just want to ask in the line int total=answer(number,5) is the number the name of the array? and 5 are the numbers inside the array?
@AsakuraClan10 жыл бұрын
yes that is exactly what is it. atleast to my understanding.
@TheGoldenChildJai14 жыл бұрын
what if the input parameter are doubles how would you do that?
@nashs897910 жыл бұрын
HI wanted to ask can we pass a multidimensional array in the same way?
@hrbharry11 жыл бұрын
'number+=5' would be equal to 'number = number + 5'
@mjdhiru13 жыл бұрын
@Programmer40 thank u so much :DD
@talkingfractal15 жыл бұрын
Thank you
@norgen45 жыл бұрын
Ur the goat come back
@mjdhiru13 жыл бұрын
@Programmer40 ok thanks... i got another doubt.... if u know everything about c++....can u go to buckys c++ tutorial video series and see the 49th video...i commented a post on that...can u plz help me wid dat..
@mjdhiru13 жыл бұрын
why do we need to return sum????? and why is the sum+=bucky[i] things is...why is there a 'i' in the brakcerts pleses someone tell..........
@tysascode12 жыл бұрын
How would i get just one of the elements?
@0xlemi15 жыл бұрын
I agree with you
@askmiller12 жыл бұрын
does this work for multidimensional arrays?
@Aggregate0215 жыл бұрын
Just break it up into simple parts and use comments to help you understand the process.
@aminmansouri273311 жыл бұрын
cool bro
@johnnyc13015 жыл бұрын
wouldnt an array " int numbers[5]" have 6 elements, 012345. JW
@lindio9510 жыл бұрын
When i declared sum, the sum is not automatically 0 ?
@filmfreak9889 жыл бұрын
Lindio Pojani So, who knows if you're gonna read this a year after posting or even care anymore, but the issue isn't what sum initially equals. The reason you set sum equal to zero is that, if you used sum previously, it's possible that it already has a non-zero value stored in it.
@GivenFailure12 жыл бұрын
What exactly does the += do
@hamadKhan2k914 жыл бұрын
please can any body tell me tat wat these headerfiles are use for...fstream and cstdlib
@bondservant4Him13 жыл бұрын
@XgothicxwarriorX is that correct?
@ArtChartable11 жыл бұрын
Of course robots need programming, but robots can have faster fingers. And it is easy to program which buttons te robot needs to press.
@alirezagyt7 жыл бұрын
how about if the array is two dimensional?
@설리-o2w4 жыл бұрын
I know I am like over 2 years late but for anyone who stumbles upon your question and wonders, you would basically use a nested loop. Something like this. int WorkoutSum(int[2][5]); int main() { int multiarray[2][5]{ {5,5,5,5,5},{5,5,5,5,5}};//Sum is 50 std::cout
@TheLonelyTraveler14212 жыл бұрын
*Looks at the titles of tutorials 25 and 26* Me: What if you populated an array with functions with arrays passed into them? 0_O
@tpetree2412 жыл бұрын
It's the exact same thing if he was to write "sum = sum + bucky[i]"
@Marty7007213 жыл бұрын
why typos :/ ????
@mancoway12 жыл бұрын
good
@talkingfractal15 жыл бұрын
nope its 5 elements since you count like this 0,1,2,3,4 1,2,3,4,5
@zhir9614 жыл бұрын
i wonder how hard the advanced coding is if this was the basic :( so hard!
@HawxTeamDelta14 жыл бұрын
btw thanks in advance
@teckninjaprodution11 жыл бұрын
you ever master it ?
@TheGreekSkater14 жыл бұрын
damn it i understood everything till the last tutorial thats getting hard
@JesusTwoThousand12 жыл бұрын
Better unlearn everything you've learned from this guy and buy a freaking book.
@FredrichNietzsche2515 жыл бұрын
@BajanCreation Yeah, It is isn't it O.o
@kajakpaddler9212 жыл бұрын
DUDE GO EASY ON CAFEINE! LOL
@ChadDrakeTech8 жыл бұрын
Your videos started off well bu now you just rush through everything.
@crateer6 жыл бұрын
Not really, just watch it again. Pretty straightforward tbh.
@thekill76113 жыл бұрын
@Programmer40 Batch? Batch is a barely used language. I started with Batch when i was 10 years old. And after 2-3 months of programming Batch, i throught that Batch isn't useful language. And so i started programming C. I don't know why am i watching this video.