@@shutdahellup69420 cool, so can you help me parse a string of the form [-]n1 / [-]d1 op [-]n2 / [-]d2 where n and m are denominators and the negative signs may or may not be there and op is + - / or * from these tutorials? What about doing it with tree's? Can you explain a tree from watching these videos? They're pretty useful.. pretty sure a B+ tree is used to store files on Microsoft so it's not just theory. But not the kind of thing you can realistically come up with creativity unless you have a math PhD.
@@ian31415 Internet tutorial will make current academia education useless. Eventually will turn out just like this in future,ton of lecture and exemple from home... Thats the future of learning.
Thanks man, I just started programming about 1 year ago, I'm 25 now and thanks to you I have been able to keep up in class. currently studying to be a software engineer. thanks bro, wish all the professors were like you.
bucky, your videos are awesome. I really enjoy them. I've been struggling in my c++ class, but after watching them, everything in class starts to make sense.
Geometry Dash Galluxi I know. Most newbies do not know "+=" so they use it basic ways like "x = x + y" since that looks very basic while we use "+=" for more efficient in writing codes.
"total += number;" ... is another nice way of writing... "total = total + number;" ... a lot of languages don't offer these nice shortcuts so i like to use it where ever possible!
After hearing the problem, I paused the video and tried to figure it out myself. To my grand surprise, I succeeded. I decided to watch the video anyway and found that what took me 40 lines of code to do (granted, I had extra some extra cout lines), took Bucky only 15. So I can code, I just manage to do it in the most inefficient way possible.
your video really help me a lot i watched it from the first tutorial and i'm gonna finish it..than sitting in the class almost 3 or 4 week and i don't get anything from it....anyway thank u..your video is the best and it's really easy to understand..
Just to point out, Bucky, using ++ as an easy and quick increment also seems to be less CPU intensive therefore this is now considered a good practise :)
LOL!!!! Love the ending "Ill see you next time when im a millionare!" :P By the way, to clear up some questions you may have he missed: What if they enter 6 numbers? Then you need an else statement, somthing like else() { cout "You can only enter 5 numbers man... dont chate me!" } or whatever
I put on captions; here's a sampling of the gems I got: "Let's go ahead and just give him a nice little pronounced rain [...] mom" "The first time the user anti remember it was ten so the total which was a hero before is now equal to zero plus ten so now totally host ten the next summer they entered was aids" "Now it it was twenty five blasphemous five also" "You guys in goa injected on calculator into words enemies who just build the best calculator unearth"
@TheBeuteOffical Yes, its possible, if you use a String instead of a Int, Strings hold 1 letter, ints hold numbers, you might learn about that later on
I'm very sure that he knows different ways of writing the same code, but remember he's making these tutorials for complete beginners who have zero knowledge about programming. so he knows what is the best. you don't have to tell him what he needs to do just to look smart . and if this wasn't your intention re-frame your sentence.
Anyone noticed that the number of integers you enter has to coincide with the test, otherwise if you enter fewer integers, the program iterates addition of the last integer up until the test is met? Good one though, Bucky!
Okay...I don't know why my comment disappeared with an "unknown error". So I guess I'll just post it again - - - - 1:22 `x++` and `x = x + 1` are not the same. x++ is actually a very unusual operator that, unlike every other type of assignment there is in C, returns the value of x BEFORE performing the operation If x is 1... int y = x++; // y = 1 int y = ++x; // y = 2 int y = x = x + 1; // y = 2 int y = x += 1; // y = 2 The way you can tell the difference between x++ and ++x, if "x++ is a post-increment and that is unusual" isn't good enough, is in the order of the tokens: x++ return and then increment ++x increment and then return The "expression returns its result" trick works very well with another fairly obscure language feature most often seen in obfuscated/golf'd code: the comma operator If you can figure out the results of this expression, then you have a decent understanding of the comma operator: result = ((a < b ? (puts("complexity!"), c = a + b, d = c * b, d + c + b + a) : (puts("simplicity!"), result +=b)), 20 + 10 + 12); ...for (a,b) in (4,5), (7,6), (0,0), and (12,9) If you can understand the source code for Muller's original brainfuck interpreter*, then you don't even need to be reading this. * For some reason, it's really hard to find online. It looks like the original distribution is no longer around. I happen to have the source code lying around, though, so here it is: pastebin.com/X04CiBX9 Lots of clever tricks in there. From the header of the for loop and how it combines assignment with the base case, to using pointer arithmetic to share memory (bf source code and "user memory") and step through the source code, to using && and || and ?: in place of if/else, to abusing the comma operator to avoid writing {} brackets for the for loop. It's got it all, and is an excellent showcase for how expressive C is.
x lines of code assuming that each statement is on a new line, just as well-written code should be. When you have everything on one line you cannot possibly debug. The compiler only tells you which line the code error is on, and a brief description of what was wrong. You can see the issue here.
"let's just copy this and email this to microsoft and hopefully they pay me you know just couple of million dollars for it " i actually laughed so hard and paused the video for a bit
I think this program better works with long command... Where is now bucky , family , maybe no time or work for corporation? GZ for best C++ tutorials Bucky , Bucky go to Next year i will bee millionere... :)
If you declare a variable inside the loop, it will only be defined as a local variable within that loop, meaning that it will not work in the main function. Also it will initialize it every time the loop repeats (which means it will return back to being = 0). tl;dr it's bad practice to initialize variables within loops (exception is for loop counter)
Hey MR. Bucky Roberts,, how many c++ tutorials have you made so far??? So far, i have seen 3 series tutorials on C++ : - Bucky's C++ Programming Tutorial (Code:Blocks, 2011) - C++ Tutorial (dev C++, 2008) - C++ Programming Tutorial (Code Blocks , 2010) so which of these tutorials am i gonna watch first as a beginner?? whats d diff between the 2010 and 2011 tutorial?? thanks..i just want to learn c++ .. NICe VIDs by the way...
@bKfASSASSIN I dont think he said it wasnt in C. I think the C++ thing pretty much means that C++ is a simpler and faster way than C just like how n++ is a a simpler way of n = n+1
Good example, however teaching var++ before ++var may not be the best in terms of coding etiquette -- while they yield (more or less) the same result, generally unless you have a reason to use the post-fix operator you should use the prefix operator (code-wise, it is technically faster and more efficient). Something I learned from my coding class.
I understood everything in the tutorial but still, I have a question: So i, didn't set a number for total at first, just out of curiosity, i left it as just a variable like int total; and then everything went perfectly fine but it just calculated the whole thing wrong. Why exactly is that?
i need help. A message keeps appearing saying that "cannot open output file bin elease\trivia game. exe access denied" the program is called trivia game. What does this mean?
Someone explain this tutorial to me, please? I understood the thing about the total, but I don't quite get the stuff he wrote about the x variable. Especially, I didn't get why int x must be set to 1.
by using the knowledge I gained by bucky (untill now) I managed to create this: #include using namespace std; int main() { int password = 123456789; int z = 1; int x; cout
When you define a new variable, your telling your computer to pick a small piece of memory to put something in. This piece of memory will have some old number left in it. If you don't set the variable equal to something, it will stay set as the old random number as default. So, in your case, the piece of memory total was assigned to had -2 left in it, and since you didn't reset it to 0, this subtracted 2 from the total.
I'm sorry, but this is literally the clearest 360p video I have ever seen in my life.
+Jacques West (West Coast Aviation) yeah... check out his other video showing his house... and you'll know why... :D
+Laurel Clemente Dinopol Link please :D
LMFAO YOU SAID IT
ikr
your tutorials>college
Yes!!!
not really, you are just learning syntax here.
@@ian31415 thats all you really need and some examples... then rest depends upon your creativity and practice.
@@shutdahellup69420 cool, so can you help me parse a string of the form [-]n1 / [-]d1 op [-]n2 / [-]d2 where n and m are denominators and the negative signs may or may not be there and op is + - / or * from these tutorials? What about doing it with tree's? Can you explain a tree from watching these videos? They're pretty useful.. pretty sure a B+ tree is used to store files on Microsoft so it's not just theory. But not the kind of thing you can realistically come up with creativity unless you have a math PhD.
@@ian31415 Internet tutorial will make current academia education useless. Eventually will turn out just like this in future,ton of lecture and exemple from home... Thats the future of learning.
OH MY GOSH I LOVE THIS. PROGRAMING IS GONNA BE SO FUN SO GLAD I HAVE THIS VIDEO SERIES.
Been watching you on solo learn to learn c++ and you are great. Sir a applaud you
Thanks man, I just started programming about 1 year ago, I'm 25 now and thanks to you I have been able to keep up in class. currently studying to be a software engineer. thanks bro, wish all the professors were like you.
1st year here, how did it all go? Did you end up as a software engineer?
@@RangerMcFriendlyman me too i wanna know
bucky, your videos are awesome. I really enjoy them. I've been struggling in my c++ class, but after watching them, everything in class starts to make sense.
Btw guys, you can just type total += number;
+Geometry Dash Galluxi Nice to know it works for C++
+Riverreed Ward :)
+Geometry Dash Galluxi That'll work. Although thenewboston only kept it simple, not efficient and quicker.
+Derek Lampa (Trackten369) "+=" is simplier
Geometry Dash Galluxi I know. Most newbies do not know "+=" so they use it basic ways like "x = x + y" since that looks very basic while we use "+=" for more efficient in writing codes.
You are the sole reason I'm understanding programming. Paid wayyyy to much for this class
Alright this is a bit confusing now. We didn't even need the "(x
I think you forgot to day "Pretty cool aha?" :P
Bucky, you gatta be the coolest guy on the internet. All your little quirky things just make you so awesome.
better than my professor
I wish he was my professor
same
+Benjy L
Oh my god that would be so awesome!
"total += number;" ... is another nice way of writing... "total = total + number;" ... a lot of languages don't offer these nice shortcuts so i like to use it where ever possible!
Couple of million dollars, and you call this a calculator? LOL!
Love your tutorials Buckey.
Finally, I learned something useful and something that is not advanced to remember, such as classes. ;)
just a couple million of dollar :)
The name C++ actually came from the concept of Unary Arithmetic Operator ++. So, C++ actually means C+1. 1:30
This is a good reminder and a wake up call for me :)
I FINALLY UNDERSTANT IT.
THANK TOU SO MUCH BUCKY !!!!!!!!!!!!!!
Bucky after 19 tutorials : Okay! Lets do something useful now
After hearing the problem, I paused the video and tried to figure it out myself. To my grand surprise, I succeeded. I decided to watch the video anyway and found that what took me 40 lines of code to do (granted, I had extra some extra cout lines), took Bucky only 15. So I can code, I just manage to do it in the most inefficient way possible.
The two teachers that were disliking each video, got tired because of the large number of videos.
Bucky wins.
your video really help me a lot i watched it from the first tutorial and i'm gonna finish it..than sitting in the class almost 3 or 4 week and i don't get anything from it....anyway thank u..your video is the best and it's really easy to understand..
"So our program is working five and dandy so far." - This is why I enjoy watching Bucky.
for those of you looking to get the average number of the 5 put this below you cout
I can explain Bucky's life in 3 words :
Awesome
Bacon
and
"So you're sayin alright...."
Pretty cool huh
Always declare variables with default values for better memory managing.
6:35
lol that cracked me up.. such a casual 19 episode build up to this moment
"...wecome to your 19th tutorial. And you know what? The bacon from previous tutorial was tasty."
Thank you Bucky for the advice especially.
great tutorial, it help me alot in understanding how to think logically
Just to point out, Bucky, using ++ as an easy and quick increment also seems to be less CPU intensive therefore this is now considered a good practise :)
LOL!!!! Love the ending "Ill see you next time when im a millionare!" :P
By the way, to clear up some questions you may have he missed:
What if they enter 6 numbers? Then you need an else statement, somthing like else() { cout "You can only enter 5 numbers man... dont chate me!" } or whatever
English is not just words put together, it basically also has something called grammar. Try it out, it makes reading messages a lot easier
I put on captions; here's a sampling of the gems I got:
"Let's go ahead and just give him a nice little pronounced rain [...] mom"
"The first time the user anti remember it was ten so the total which was a hero before is now equal to zero plus ten so now totally host ten the next summer they entered was aids"
"Now it it was twenty five blasphemous five also"
"You guys in goa injected on calculator into words enemies who just build the best calculator unearth"
Good to know
Your comment made me feel warm and fuzzy inside too :D
@TheBeuteOffical Yes, its possible, if you use a String instead of a Int, Strings hold 1 letter, ints hold numbers, you might learn about that later on
Best c++ tutorials
Shorter version of total = total + number is total += number :)
you could just do "total += number"
And I thought people telling him to use "bacon++" in the last tutorial were sad...
***** you have to keep in mind, these tut's are for complete noobs to c++, so they way he does it explains it better, bacon ++ is just a shortcut.
I'm very sure that he knows different ways of writing the same code, but remember he's making these tutorials for complete beginners who have zero knowledge about programming. so he knows what is the best. you don't have to tell him what he needs to do just to look smart . and if this wasn't your intention re-frame your sentence.
jeez, why am i even replying to a 4 year old comment?
@@Rahulbajaj561
hey dude I like ur username
holy shit!!! i just made a stone aged calculator :D im starting to like this tutorial a lot :D
Thank you bucky for sharing the video..........................
So whats the point of "x" being there after you have made the int "number"?
No, because it will increment it only by 1. But you can make it like this:
total+=number;
That will add number to the total.
You already are a millionaire for me!!!! ;)
cheers, can't wait for more!
cout
Anyone noticed that the number of integers you enter has to coincide with the test, otherwise if you enter fewer integers, the program iterates addition of the last integer up until the test is met? Good one though, Bucky!
Okay...I don't know why my comment disappeared with an "unknown error". So I guess I'll just post it again
- - - -
1:22 `x++` and `x = x + 1` are not the same. x++ is actually a very unusual operator that, unlike every other type of assignment there is in C, returns the value of x BEFORE performing the operation
If x is 1...
int y = x++; // y = 1
int y = ++x; // y = 2
int y = x = x + 1; // y = 2
int y = x += 1; // y = 2
The way you can tell the difference between x++ and ++x, if "x++ is a post-increment and that is unusual" isn't good enough, is in the order of the tokens:
x++ return and then increment
++x increment and then return
The "expression returns its result" trick works very well with another fairly obscure language feature most often seen in obfuscated/golf'd code: the comma operator
If you can figure out the results of this expression, then you have a decent understanding of the comma operator:
result = ((a < b ? (puts("complexity!"), c = a + b, d = c * b, d + c + b + a) : (puts("simplicity!"), result +=b)), 20 + 10 + 12);
...for (a,b) in (4,5), (7,6), (0,0), and (12,9)
If you can understand the source code for Muller's original brainfuck interpreter*, then you don't even need to be reading this.
* For some reason, it's really hard to find online. It looks like the original distribution is no longer around. I happen to have the source code lying around, though, so here it is: pastebin.com/X04CiBX9
Lots of clever tricks in there. From the header of the for loop and how it combines assignment with the base case, to using pointer arithmetic to share memory (bf source code and "user memory") and step through the source code, to using && and || and ?: in place of if/else, to abusing the comma operator to avoid writing {} brackets for the for loop. It's got it all, and is an excellent showcase for how expressive C is.
Damn!
Because it was TOO AWESOME.
to keep it simple, this is basic programming. But total +=number is legit.
total+=number;
works the same way and saves you keystrokes.
Python: 8 lines of code
C++: 20 lines of code
x lines of code assuming that each statement is on a new line, just as well-written code should be. When you have everything on one line you cannot possibly debug. The compiler only tells you which line the code error is on, and a brief description of what was wrong. You can see the issue here.
x++ adds 1 to the variable "x"... x
you can also do x+=1, same outcome
Hey Bucky where are your tutorials about converting strings to lower case or upper case letters and finding out their lengths and all those stuff ?
That would make sense. Thank you.
"let's just copy this and email this to microsoft and hopefully they pay me you know just couple of million dollars for it " i actually laughed so hard and paused the video for a bit
*INCLUDE AND NAMESPACE*
int main()
{
int x;
cout
best calculator on earth xdxdxdxd
I think this program better works with long command...
Where is now bucky , family , maybe no time or work for corporation?
GZ for best C++ tutorials Bucky , Bucky go to
Next year i will bee millionere... :)
Shouldn't an error be shown if I enter more than 6 numbers as the input?
preeeeeeeeeeeeettty cooooooool hahhhhhhhhh!!!!!
when you enter a number over 9 digits, the computer explodes.
Did you become millionaire? :D
Of course, he did.
I think he knows all the programming languages in the world so,he did indeed
I guess that. I am dreaming to become one day like him doh :)))
VeldroN hello :D
have you achieved that goal? :)
You must use #include -LSS-string-GTR- and replace any int with string
Why when i position "int total=0;" inside the While loop function , i get an error?
If you declare a variable inside the loop, it will only be defined as a local variable within that loop, meaning that it will not work in the main function. Also it will initialize it every time the loop repeats (which means it will return back to being = 0). tl;dr it's bad practice to initialize variables within loops (exception is for loop counter)
You are the best. Really.
@SuperHappyvideo
x++
adds 1 to x
if x = 1
and u do
x++
cout
You can also do total += number;
Hey MR. Bucky Roberts,, how many c++ tutorials have you made so far???
So far, i have seen 3 series tutorials on C++ :
- Bucky's C++ Programming Tutorial (Code:Blocks, 2011)
- C++ Tutorial (dev C++, 2008)
- C++ Programming Tutorial (Code Blocks , 2010)
so which of these tutorials am i gonna watch first as a beginner??
whats d diff between the 2010 and 2011 tutorial??
thanks..i just want to learn c++ ..
NICe VIDs by the way...
@bKfASSASSIN
I dont think he said it wasnt in C. I think the C++ thing pretty much means that C++ is a simpler and faster way
than C just like how n++ is a a simpler way of n = n+1
Good example, however teaching var++ before ++var may not be the best in terms of coding etiquette -- while they yield (more or less) the same result, generally unless you have a reason to use the post-fix operator you should use the prefix operator (code-wise, it is technically faster and more efficient). Something I learned from my coding class.
I understood everything in the tutorial but still, I have a question:
So i, didn't set a number for total at first, just out of curiosity, i left it as just a variable like int total;
and then everything went perfectly fine but it just calculated the whole thing wrong. Why exactly is that?
Hahahaha nice folder name bucky. 5:22
Have you skipped half the tutorials?
I was actually thinking about that exact thing 2 days ago...
Thanks! Never noticed :)
I'll rather preffer to study from here rather than BOOKS!
i need help. A message keeps appearing saying that "cannot open output file bin
elease\trivia game. exe access denied" the program is called trivia game. What does this mean?
@TheNeweN24 not sure if this is in engineering but its in computer science for sure
Thank you sooooo much!!!
i like your good commendatory!!!
copy and paste it to microsoft and be a millionaire hahaha
very nice tutorial
Someone explain this tutorial to me, please? I understood the thing about the total, but I don't quite get the stuff he wrote about the x variable. Especially, I didn't get why int x must be set to 1.
by using the knowledge I gained by bucky (untill now) I managed to create this:
#include
using namespace std;
int main()
{ int password = 123456789;
int z = 1;
int x;
cout
you are the best
You would not need 5 different integers to save the cin values?
Well explained
The Best
Super STUFF !!
Whats so special about Bucky?
Well, unlike many other foolish tutorial series, view count does not decreases as the program progresses!! :D
Thanks! :D.... Really Helpful!
#include
using namespace std;
int main(){
int a = 1;
int number;
int total = 0;
cout number;
total = total + number;
a ++;
}
cout
its the best calculator in the earth lol
lol..nama kau..jilake..ahha
@i3oges that's true...but the previous number will be same....
if um not declaring total = 0, the final value of total is 2 short ( if the sum of 5 number is 10, but shows 8, ). whats the reason?
When you define a new variable, your telling your computer to pick a small piece of memory to put something in. This piece of memory will have some old number left in it. If you don't set the variable equal to something, it will stay set as the old random number as default. So, in your case, the piece of memory total was assigned to had -2 left in it, and since you didn't reset it to 0, this subtracted 2 from the total.
I wonder when your tutorials gonna stop?!?!?! cuz I have work to do and I can't just stop hitting next vid :D 10x
You are talking about c++ shorthands!
thanx bucky
What if I want to show me al the numbers that I introduced in ascending order??