C++ Tutorial – 6 – Beginning Functions

Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –






41 responses to “C++ Tutorial – 6 – Beginning Functions”

  1. Ahmad Jambu Avatar

    u can also replace the math function with # include<math.h>

  2. Pranav Raghaw Avatar

    Which is the software u r using

  3. googleplussucks Avatar

    Why in the world are did you do "using namespace std" within main???

  4. Andrew Feist Avatar

    it uses double because its twice as precise as float

  5. sai hem nikhil Avatar

    Can we become a gud hacker on games after all learning all ur tuts?

  6. lamicorp Avatar

    Include C Meth Library. Done.
    About the name "double" – used to be synonym for long float. Long float was removed in C89 standard. (to be more specific, single precision and double precision originated in Fortran)

  7. Fang 86 Avatar

    9 + 11 = 20… 9/11

  8. parris compwiz Avatar

    is it true king kong was the best programmer?

  9. Glampkoo Avatar

    Visual studio is so much faster and better.

  10. Johnnies WebCast Avatar

    @Obretin use this "The square root of " . a . "is" . b;

  11. obretin tudor Avatar

    when i hit run, it tells me the square root of the number but with no spaces…it says: the square root of121is11…i wanted to be:the square root of 121 is 11
    any help?

  12. McCree114 Avatar

    I feel like I should be paying you tuition for watching these videos.

  13. LaserGunsLG Avatar

    you dont have to do the whole thing with num2, you can just say sqrt(num1) when you need the square root.

  14. Dummy838 Avatar

    So basically, what 'double' does is that it adds decimals? So using 'int' will just round it to the nearest whole?

  15. mindtastical101 Avatar

    thanks i understand now!

  16. meanwhile Avatar

    The square root of a number is the number you start with when you square them. Example: 9² = 9 * 9 = 81. Here, the square root of 81 is 9. If you don't know the exact meaning of squaring/cubing, when you square a number, you multiply that number by itself once. Cubing is exactly the same, but you multiply it by itself twice (9 * 9 * 9). The ² or ³ is the amount of times you multiply a number by itself.

  17. mindtastical101 Avatar

    im 10 i like programming in notepad c++ and java. but.. what is a square root of something?

  18. One_billion_gagillion_fafillion_yen Avatar

    friendly advice: self-learn programming at your own pace
    however, teachers can help you with questions and other problems

  19. TheDeLeG3nD Avatar

    Damn, thanks to pascal this shit is easier to comprehend so far. :O

  20. DDlol01 Avatar

    Double is not really double precision as it has more than double precision of a float. It has double the space in the RAM. On a 32bit system, float uses 32bit (1 bit for the sign, 8 bits for the exponent, 23 bits for the significant) and double uses 64bit (1 bit for the sign, 11 bits for the exponent, 52 bits for the significant). Double uses twice as much space as a float.

  21. Professor Duck Avatar

    Nice video dude. Great job explaining so far, and I'm getting it all. I now like experimenting in C++ and FreeBasic. I started with Yabasic and moved to Freebasic from there. Very fun. Keep up the nice tutorials.

  22. Youngstown Parade Avatar

    Yes. Hold your horses. I'm sure Bucky will get to this in some of the later tutorials.

  23. genkers Avatar

    im new to this i was wondering if anyone knows the answer to my question, is it not possible to make another function beside the main, and have that funcion after main but somehow be called in by main i think im confusing my self,
    int main()
    call to 1function
    1 function()

  24. MrTroopa30333 Avatar

    std::cout <<"Nice video!" << std::endl;

  25. J FaHnz Avatar

    better than any teacher ive had at morgan state university smh

  26. guillaume263 Avatar

    nice ,u can google

  27. MrTomahawkPr0 Avatar

    lmao i just downloaded the new AVG and it doesn't let me debug it since it find viruses…

  28. cullenrhodes100 Avatar

    the 'double' data type is also similar to the 'float' data type, although as @HappyFoxIsHappy has pointed out, the 'double' data type is used because it is more precise than one floating point

  29. Jess Hankin Avatar

    int is only full integers, double will take decimals and multiply them, add them, etc.

  30. mr1CN Avatar

    Because num 2 is the sqrt of num1 right… and the sqrt of num1 is going you a value with decimals..
    "int" can only take numbers that dont have decimals (eg 5).. "double" can take numbers with decimals (eg 5.85)

  31. Gaklord Avatar

    These tuts are GREAT! Omg I love this.

  32. Realityfails Avatar

    i wanna know why too!

  33. Dramon0412 Avatar

    why can't I use
    int num1;
    instead of
    double num1

  34. Brandon Pupp Avatar

    actually a Float variable is the standard real number, a double is a real number with twice the amount of maximum decimal points.

  35. Elliott Hankinson Avatar

    How do you create functions, not use them?

  36. Hentai_Legend Avatar

    Can you make a list of variables and what they are?

  37. Dimitris Tsimpitas Avatar

    hey man i got a problem…when i execute it , it normaly says "pick ur number" when i choose a number and press enter it shows "the square root of……." and closes really fast. beacuse system("pause") didn't work for me i have cin.get();

Leave a Reply

Your email address will not be published. Required fields are marked *