Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (90)

Sign In or Sign Up now to post a comment!
  • sense of humor and free education. Bucky u the man!!

  • we love you. rap!

  • pretty cool huh :\

  • I made that user enter numbers so it's a basicly simple simple calculator. :D

  • you're saving my life in my C++ class. thank you god!

  • I wish my lecturer teaches as good as you. LOL

  • Does anyone else go ahead and make what he does in every tutorial more complex? this one for example i made it so i enter the numbers and there not pre-set, i think its good for learning.

  • @PhishTaco9 i do that too :b

  • @PhishTaco9 I made a very basic calculator lol

  • Oh oh oh, HEY GAZZ WASSUP?

  • CRINGE AT START!

  • Comment removed

  • intro:ugh ugh ugh,

    hey guys, WOTS upppp

    welcome to your

    eleventh tutorial

    and in this

    tutorial

    hahahahahahahah

  • "Let's make some magic happen baby" - that's what he said...

  • Now let's make some magic happen!

  • bahaha nevermind, I shouldn't have paused it and went into a panic! as soon as I pressed play you explained is :L

  • Why do you use Cout for multiple parameters, but if you have a single parameter you don't?

    In the last video you just printed the functions name in main

    printCrap(12);

    but this time

    cout << addNumbers(43, 86);

    I assume if your returning a value you use cout to print to the console? I'm not entirely sure xD

  • @TheElectricEchoes In the printcrap() function, it had code in the function that printed it out to the screeen so there was no need to use cout, also, that function was void which means that it returns no value, so it couldn't be printed to the screen in the same way as the addNumbers() function. In the addNumbers() function, it returned a value and he used cout to print that returned value to the screen. Hope that made sense!

  • You fucking rule bucky

  • the C99 standards defines that you should be able to use at least 127 arguments.

    cheers !!

  • x !! y ???.. because I fuc.... Z so

  • I don't really get the return part. I don't get why it's so important and why that's the difference between void and int.

    using namespace std;

    int addnumbers(int x, int y)

    { int answer = x + y; cout << answer;

    }

    int main()

    { addnumbers(7,9); return 0;

    }

    I tested it and it worked so why do you have to use return and not just cout it?

  • @RSFireworm999 ugh youtube messed up my brackets and spaces etc but you'll get it >_>

  • @RSFireworm999 To make it more versatile, if you don't return it you can only use it inside that function, so if you want to output it outside the funtion it wont work.

  • @erikhoj1996 thx

  • @RSFireworm999 you can just cout it for simple functions like that, but what if you don't want it printed to the screen and instead you want it to give you a number that you can use in another calculation? int addNumbers(int a, int b) { int sum = a + b; return sum; } void divide(int x, int y) { answer = x / y; cout << answer; } int main() { divide(50, addNumbers(50, 30)) return 0; } Hope this makes sense! :)
  • @SeanRamey holy cow, well sorry.. youtube didn't print it like I had it... now it really won't make sense... sorry...:(

  • @RSFireworm999 bucky knows what hes doing :D

  • @CloudDecim no doubt he does,

    they've already answered my questions anyways :)

  • oh yeah pretty cool huh. :)

  • @n3ffey you would use it if you had to reuse the new function later on in the program. Rather than having to declare all of the values again, you can quicken the process by using the function with the parameters for example int add (int x, int y, int z,){ cout<< x + y + z } int main () { cout << add( 4, 5, 6); cout << add (11,32,45) } that is a lot quicker and easier than retyping all of the variables, especially if there are tons of numbers to input
  • Do you need the (return answer;) ? - Thanks is advance for the answer!

  • donn everr everrrr.... try to sing ...

  • @conflustered thanks!

  • great tutorials, bucky, but I wonder, how do I declare a variable with string (text) value

  • @kojax98 underneath #include iostream add #include string then declare the text as a string

  • You're a pro!

  • Bucky you forgot to tell us we can replace the parameters for a variable once in the main function.. :D

  • can someone tell me whats the point of the return i tried the program with and without return but it runs the same can someone please tell the use of the return

  • @AtomicRagProductions If your function's data type is anything but void, you need a return to end the function

  • why arent these vids in a playlist? i really wanna save them all.

  • wtf was the beginning?..

    lost a bet?^^

    

  • Hey You! Hey Guyz!! rock and roLL.. Oh Oh Oh yeah!!

  • guys.. sombody pls.. wat shud i do if i had to get the values from the user.. its really pissin me off.. nth comes to my mind.. anybody??? help me out..

  • @lvlycreator92 cin >> x;

    that's assuming x is the variable you want to use

    go back and watch the older videos.

  • @lvlycreator92 You'll make a variable that takes the input from the user, then you'll "pass" these variables to your function. I could be wrong, but I think the variables have to be different then the functions parameters.

  • @ResidentBiscuit

    there is difference between local and global variables

  • 3:10- But what if you do 0+0? :P

  • @proudTBeGreek .. am sory. yeah i actually meant cin>>

  • What function type would I use to return a string?

  • what shud i do if i had to get the values from the user???

    i ve tried puttin the cout<< in al posible place!! can u xplain?? :)

  • @lvlycreator92 maybe you mean cin>> ??:S!

  • If you don't use "return answer;" it will still work. What is the real use then of "return answer;".

  • bucky, i want you to make love to me in C++

  • in song? u call that song bucky? :S

    

  • Gaah! Spent thirty minutes looking for mistakes because I kept getting some kind of error. I forgot to change void to int... =P

  • lol at intro

  • What about parameters like inta, int b, ... int x ??? I mean function with parameters like dots [...] and then the last one.

  • Is it bad to put my other methods under my main? I like keeping the main on top, I'm just worried that it might get confusing with more advanced tutorials or with working with other programmers.

  • @DjZephy as long as you prototype those functions, ur all good ;)

  • LOL

    i keep getting errors because of the ;

    -.-

  • @PorifersAnims Its a matter of practice. You pretty much always use it after declaring variables, and after using the asignment operator. Also at the return statement. You also use it when you're declaring a function. There are more stuff when you use them but you're probably not at that stage yet, like when using classes. int function(); main() { cin.get(); return 0; } int function() { int number; number = 9; return number; } hope that helps.
  • ok the beginning was soo gay:P....

  • @caspowns Y U CALL TEACHER GAY

  • I have start to see this Tutorial for 3 hours ago, and I now almoust nohting,  now make a calculator that I can type in values​in the run, and choose whether to write plus, minus, multiply, or divide. and it does not stop there, to continue on, say your guide is valuable and informative:) I go to nexst tutorial:)

  • 4:49 thats what she said.

  • @ zuberguber105 i ate it.....

  • Couldnt you have just done 'return x+y;' instead of using an answer varaible?

  • @rainbowcrak If you do that, it only shows the return in the compiler command line. If you try running the compiled .exe file in a cmd.exe window, it doesn't show the return.

  • hey i need help...... i did all of thos,but when i start a program, it just flashes on my screen..um...how do you keep it on the screen?

  • @gojatheking if ur using dev c++ u need to use system("pause"); in the main function to keep it on the screen

  • I've learned so much.

    You Rock Bucky!

  • dont you have to use cmath to calculate numbers?

  • @siva18visu I think you only need it for complicated calculations like log and ln (I think)

  • @siva18visu

    The cmath library is just for certain syntax's like pow, sqrt, sin, cos, tan, etc.

    Addition, subtraction, multiplication, etc are in the iostream library.

  • At the beginning of this tutorial I thought he was high or something xD

  • Comment removed

  • thanks for new tutorials!!!!!!!! woohhhooo

  • Excellent tutorial , nice and easy to understand . Keep them comming . Thank you.

  • exuse my French, but what the fuck happened to JavaScript???!

  • @Zuberguber105 Hey, i wan't to build a game engine, JavaScript is a piece of shit when making apps, but it's the best in simplicity and scripting.

  • @SergeantNugget Ever tried Python? Simplest scripting language, ever.

  • @Zuberguber105 HE NEVER COMPLETES ANYTHING wtf!

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