Added: 2 years ago
From: thenewboston
Views: 53,947
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (138)

Sign In or Sign Up now to post a comment!
  • i have gat a problem ISO C++ forbids comparison between pointer and integer i dont now why

  • i love this his lessons it's simple and not confused at all

  • i swear thank god for youtube

  • 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.

  • If someone has any questions about this or other videos you can always message me, I have free time to explain you why things are so. I understand it.

  • 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 ..???

  • too fast  @@

  • Woooooow, dude slow down! I can't watch your videos anymore!

  • I just got mind raped....

  • 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..........

  • @mjdhiru okay we need to return the sum because we sent the function an array and a integer called num. The name of the function is answer. But in front of it we put int because we are only working with integers. We have to return the sum because there was no void in front of the function answer. Void means you will not return anything. If you don't want to return the sum variable for some reason then you would put void in front of it and just cout the sum variable in the answer function.

  • @mjdhiru oh and also we need to put the i in the brackets too is because the loop increments adds i every time by one. so we have an array that has 5 memory units, actually 6 because of the null 0 /0 so the loop starts at 0 and goes to 4 because the fifth unit is for the null 0. So the i is for bucky[0] bucky[1] bucky[2] bucky[3] bucky[4] but the for loop just lets you do it easier.

  • @Programmer40 thank u so much :DD

  • @mjdhiru no problem man

  • @Programmer40 its kindia hard for a 13 year old boy to learn c++ as his first language

  • @mjdhiru yeah right on I think I started with batch when I was 13

  • @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.

  • @thekill761 I find it quite useful and use it in my work a lot, it makes tasks a lot easier for me, and if you don't know why you're watching this video then I'm not really sure why you're messaging me Programmer's Ego maybe?

  • @mjdhiru I think you should learn c, before you learn c++; I think it would be easier for you to catch on.

  • @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..

  • @mjdhiru I'll try to help you and I do not know everything about C++ there is always more to learn and it is changing

  • @Programmer40 It's easy to catch on if you know pretty much any other language. I know Java and mSl and I am skipping through these tutorials, briefly pausing them to read the code and get the main idea. I would actually suggest that somebody learn Java first. This guy has great Java tutorials.

  • @Vapula909 yeah if you know Java man you're pretty much all set dude you could probably fly right through, I haven't had the chance to read any java books lately so I don't know it because of my work and school. This guy does have some pretty good videos. But there is always more to learn. Adios for now man.

  • I was like, "YES I'M SO PRO AT C++ NOW!"...

    Until I got to this video

  • This thing took me 40 minutes 3 minutes watch *understood*, 3 minutes watch *dumfounded*, 14 minutes rewatch again and again, 10 minutes practice, 10 minutes figuring out the errors. LOL it's a 6 minute video!

  • hey i watched all of your tutorials 1-this video and on this one i have know idea what this is int answer(int bucky[],int num){ int sum=0 for(int i=o;i<num;i++){

  • THANK YOU MAN YOU ARE GREAT

  • Can we also pass the reference of an array into a function?

  • @BajanCreation Practice And you will be pro with it.

  • makes 0 sence..

  • where did the "i" in the bottom come from?

  • Comment removed

  • @KamelineEinbein it's just a random symbol like x, it could be any other variable like for example if you would use X :

    for(int x=0;x<num;x++)

    {

    sum+=bucky[x];

    }

  • You always say "Im prolly gunna get a bunch of errors..." and you never get a single one..... you douche.......=-)

  • 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

  • or you could just use a calculator

  • How the hell do you block letters and characters from a multiplication algorithm. these tutorials are awesome but i've yet to figure it out. Cheers!

  • You can also pass the pointer to the array instead of whole array. For instance: int answer(int *bucky, int num);

    The thing is, array is simply an address to first element. So when you create an array like this: numbers[5], numbers = address to first element.

  • @Pradipna so doesnt that mean the array is always passed by reference?

  • @bondservant4Him Yes, that is true. In the both cases - passing by pointer or passing the whole array - it is passed by reference.

  • @Pradipna so why would anyone pass a pointer to the array if its already a pointer, is there a reason?

  • @bondservant4Him You are not passing a pointer of pointer, you are just passing the pointer of first element. Since array identifier points to first element, you just pass that to the function. lol

  • I got a sum of 270

  • @XgothicxwarriorX is that correct?

  • @bondservant4Him No, the right answer is 131.

  • Thank you this progame help me to achieve a lot

  • I need to take a breathe before hitting F9 :)

  • you are always so creative int numbers lol

  • Although I understood this, I agree he wasn't detailed enough here. He was talking too fast and he didn't take the time to explain what is going on line by line (especially while he was creating the answer variable.) I think maybe, he was just having a bad day. He also did this from middle to top to bottom which confused things further.

  • @punkasaurusred hes tired of teaching us noobs.

  • i wonder how hard the advanced coding is if this was the basic :(

    so hard!

  • 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.

  • what was int num for ?

  • @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<num;i++)

    and that means that it will only run as many times as whatever number num is. and if you are wondering, yes he could have just said <5 instead of <num

    i hope that helped, i know its confusing, im learning also. im a little past these tutorials now, but i was looking for more advanced stuff of arrays with functs.

  • @asfadasfa1234 oh, i didnt see that hehe, i have moved on to more complex stuff now as well, even released some simple programs you can find my work on cachedump(dot)webs(dot)com/pro­gramming

  • really man....you seriously rock........gr8 work....

  • the first tutorial where i got really confused to the point where i cant really grasp

  • @coolguyace took me a couple reviews of previous vids to understand this one....least i kno i wasnt alone in not understanding!

  • @kurmakk well im not in college yet so you probaly understand more than i do, i know this stuff is hard so im learning a little bit of programming before i go to college this fall for it. learning C# would be very useful. (i was assuming youre in college and didnt realize it lol) good luck

  • 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)

  • Comment removed

  • Anyone saying it's hard: Stop learning programming, learn a scripting language. This is easy compared to the things you have coming if you continue with C++.

  • we can simply say

    cout<<"The sum is: "<<answer(numbers, 5)<<endl;

    without using the variable total...it would work too

  • Comment removed

  • btw thanks in advance

  • 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..

  • damn it i understood everything till the last tutorial

    thats getting hard

  • i'm gonna set that equal to zero, aaand you probably should too

  • @TheGoldenChildJai Simple; when you declare your array, instead change the variable type to double, and do the same when you call the summing function. The program will still do the same thing; add the values given.

  • Ok, I m a Computer Eng. student & found them very supportive & helpful. By the way do u an MIT student, just asking, reply please

  • you didnt use a fun example :(

  • I have get it after 3-4 times. Thanks a lot dude, but do it a little slower

  • what if the input parameter are doubles how would you do that?

  • Comment removed

  • good job- thanks for the tutorial- :)

  • You're starting to go to fast.

  • @MrNitt Way too fast... :/ this video and the previous two I didn't understand.

  • THANKS BUCKY, YOU ARE MY HERO, BECAUSE YOU SAVE MY CARRER.

  • First one i had to actually go over to fully understand lol

  • hey what if you create an array with a length of 1000 because you don't know how many you need but you know it's less than 2000, but greater than 300. You input values into the array with only 500 elements, how can you return the array of used elements and not the entire array?

  • 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.

  • Comment removed

  • Hey Bucky, Are you gonna make tutorials on making games using C++?

  • please can any body tell me tat wat these headerfiles are use for...fstream and cstdlib

  • @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.

  • 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)

  • @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.

  • theese tutorials are getting a little too fast man but they still rule!!

  • Interesting! Keep it up, dude!

  • TOOOO FASTTT!!!

  • @Molbs100

    If it is too fast, you watch it again, and use the pause button. SIMPLE

  • @ginobally

    yeah but...in other tutorials he was detailed..now he is just like...really fast it was better before :\

  • @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).

  • @dmdrummer23

    yes..between the time of me posting this comment and you replying I have watched all of his tutorials and its starting to make sense. I have had made many useful programs with c++. This is about the 3rd or 4th language I have learned...(python, C++, Javascript and PHP) I have much more to learn but hey...I don't think its too bad for a 12 year old??

  • @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++.

  • @dmdrummer23

    Haha, thanks:)

  • wouldnt an array " int numbers[5]" have 6 elements, 012345. JW

  • 01234

  • @johnnyc130 No, in C++ im pretty sure initializing an array is taken as a literal amount of elements, not an amount indexed from zero.

  • @johnnyc130 no, "int numbers[5]" have 5 elements, 0, 1, 2, 3 and 4

  • nothin to see here

  • For those who are having trouble grasping this, try back tracing from the final results. the "total"

  • I have to agree, it's going a little fast now, the last couple of tutorials so far have been a little hard to grasp.

  • in my experience, using the sizeof() function with an array will simply return how many bytes the data type can store.

    For example

    int = 32Bits (4 bytes)

    unsigned char (8 bits) 1 bytee

    try it :D

  • ok nvm i kinda get it after i watched it like 3 times and went over loops again. nice tuts, but ur explaining so fast now

  • 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

  • hm i dont get this..u went too fast

  • Is there something similar to python for c++ when checking for the length of an list/array ?

    python: len(list)

    c++: ???

  • The function that you can try using is: sizeof()

    This works in C++ as well as C.

  • Thank you

  • @Aggregate02

    caution though..sizeof(array) will return the size of the array not how many items are in the array

  • Yeah, but you can create a simple function using the sizeof() function and divide it by the size of the variable type.

  • nice, btw u didnt need that variable total.

  • this tutorial was really confusing... all the other ones were great though

  • Just break it up into simple parts and use comments to help you understand the process.

  • 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...

  • Also, bucky, that's 4 elements, not 5. Remember, elements start with a 0, not 1.

  • if I*

  • I must be wrong, actually.

  • nope its 5 elements since you count like this

    0,1,2,3,4

    1,2,3,4,5

  • i thought i could become a pro in a day listening to you buck, but you are starting to explain things faster. I will keep trying, though.

  • not that great of a tutorial, too confusing, mayb shoulda gone over everything after you typed it. too quik, youtube gives you 10minutes, use them. I am sorry bucky but i think ill just get a programming book = (

  • lol tihs looks hard i thin im going to review the over 24 tutorials first or something

  • just don't use this method for large arrays!!

    use a pointer instead.

  • this is getting hard

  • I agree with you

  • @BajanCreation Yeah, It is isn't it O.o

  • hello sir

    are you going to post more C++ tutorials?

    Please do

    Thank you

  • yes i agree. please do.

  • Yes! Finally another Cpp tutorial!!! :D Thanks Bucky! You rock!!!

  • nice tutorial!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more