Added: 3 years ago
From: thenewboston
Views: 114,566
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (341)

Sign In or Sign Up now to post a comment!
  • Double = Double-Precision Floating Point

  • how is double different from int?

  • @dmanrox2 doble allow to use floating point numers (ej: 3.14), int is for integers only.

  • @dmanrox2 if you have e.x 3.14:

    int--->3(i think floor :))

    float--->3.1

    double---->3.14

    double number has 2xbits of a float number

    sorry for my english :(

  • Why is it that when I do the << after another statement like you do it fails? I have to do cout <<

  • Who needs Ipod and Ipad, when you have Cmath, Cin and Cout xD

  • If funcitons are in every c++ program,

    it's probably gunna be kinda important.

  • 81's exactly what I picked! OMGSauce!!!!111!!1!!1!! :0

  • whenever i try to use the << to join variables and string, my compiler does not work and it does not run. :-/ please help

  • @compsaad what does it say as an error?

  • cout << "Nice video!" << endl;

  • how will we make software and stuff with a computer language??I've understood all your tutorials only thing i don't get it is how will we use all of it when making a software or game or etc...??

  • @someguyy2 If you wanna make games in C++ id recomend checking out the SDL library. Theres a good guide on it on Youtube called "Lets make a game in C++".

  • Comment removed

  • Comment removed

  • Hello roberts

  • I'm doing exactly the same but it shows me the error for num2 = sqrt(num1); but I can't understand why.

  • WARNING!

    For those who found a VIRUS when they compiled the program, they have been infected with a intelligent virus that infects the compiler (usually dev++). The virus can insert the back-door code at compile time which means even a simple hello-world code could harm your computer!

  • @psyntercity are you serious

  • @CloudDecim yeah i had the same problem few months ago before i change my main OS to linux (sry for the late feedback)

  • @psyntercity I think i found a virus while compiling... What should I do?!??

  • Does anyone know what compiler buckeys using? I use dev c++ but its dumb

  • @SuperYuxuan he uses dev c++ aswell

  • Comment removed

  • 1:35 thenewboston> i don't know what you mean whit "real number"... double is any number incl. decimals

  • @BackSideOFFThemoon - a real number is the correct term. it is a number with a decimal value such as 5.0 or 22.113

  • Thanks for these videos. After completing the 6th video and trying to compile and run my avg reports a trojan horse generic20.AKRI. Is this a common problem? It seems to exist in the .exe file which can easily be deleted. I did a search on google for this type of problem but it didn't come up with anything. Any help appreciated. Thanks!

  • i type in the exact same thing but when i compile and run, it goes away after i enter a number. How do i fix?

  • Comment removed

  • Why the heck i have been getting undeclared identifier for num1????

  • How do I make it so when I press any key after the square root was found, that the program will not close?

  • @dfsacfnobhdsobdsnvas put this after: "system("PAUSE");" or "cin.get();" or "getch();"

  • @JimisTutorials I know how to do that, but how do I loop it?

  • @dfsacfnobhdsobdsnvas You can system("PAUSE"); or you can loop the function with the goto or while looping functions

  • @dfsacfnobhdsobdsnvas learn about Loops in C++ and you will figure it out :)

  • Whats the difference between int and double?

  • @Thevideoclown Int is an integer, it tells the system to allocate 32 bits for storing some integer in binary code. Double is a decimal number, it tells the system to allocate 64 bits to store a decimal number.

    i.e. Pi (3.1415...) would be double, and 2048 would be an int.

  • @Thevideoclown you probably know the answer by now but i think int is for a integer with no decimal and doubles are used for decimals numbers. if u put 10.33 into a int you would get an error.

  • @Thevideoclown best easy way to remember is:

    whit double u can use numbers like 1.5, 2.45, 10.3 and etc

    whit int u can use only numbers like 1, 10, 52, 36 etc

  • @maroci64 When replying to you, the term "Don't feed the trolls" comes to mind, but I will reply anyway. This guy, as you can see, has explained very clearly, basic functions in C++, therefore helping people who want to start coding. If you think that that is 'Low Grade' then you have some serious issues with the standards you have in life. I recommend you visit a doctor as soon as possible. I'd like to see you explain it in such depth, with such simplicity.

  • cout << " 12 people thought the disliked button was the compile button " << endl;

    system("pause");

  • I am shocked that you didnt choose 20 as the number

  • cheers bucky

  • @themanp6p You should only use cin.get() when you dont have any cin commands in your script, cin.get() kinda waits for user input before closing because no user input has happened yet, but if you already have a cin command in your script it gets the previous input and closes

  • Thanks for these... i had a lot of trouble with learning this language before I found these videos, because it's hard to even find a good compiler without some help...

    So, the point was, thanks a lot, you're just awesome ._.

  • whats the difference between int and double?

  • thanx for uploading this Amazing tutorial series! 

  • what does " [Linker error] undefined reference to `WinMain@16' " mean?

  • what is the difference between cmath and math.h please help :(

  • so is "double valuehere" like "int valuehere" then? - whats the diffrence

  • @dabbad445 int is any whole number double is any real number

  • @bondservant4Him Oh so int is whole numbers and double is any whole or decimal correct?

  • @dabbad445 correct, if you have any other questions you can PM me Im on all day everyday and i like to help people understand things

  • @bondservant4Him how do you do negatives?

  • @AstralVids negatives are covered under int and double and float

  • @bondservant4Him I did write double like he said in the video and I did the "-" dash sign but it didn't work or maybe I'm doing it wrong

  • @AstralVids PM me your code so i can see how your doing it.

  • You are such a great teacher, Bucky! I will be ahead of my class once i get into college! :D

  • are you reading a book at the same time? heard it at 0:40

  • Bucky is the boss

  • Best C++ compiler in your opinion???

  • @jbeatles99 lol know your not asking me but try Code::Blocks, its pretty good.

  • I passed my C++ exams cause of this guy, pretty cool huh?

  • I do the exact same thing but it always highlight the cout line in red which I assume is an error in the code, I even checked it just to make sure but it always does this so annoying

  • Dude I'm learning so much i swear, Thank you so much I'm in your debt >_<

  • C++ is pretty much the same as java, with some additions.

  • You are the best teacher i have ever evaaarrrr seen.THank you man

  • goose fraba goosefraba

    i dont get it, cuz i hate everything i cant do but i love the new boston tutorials

    ill eventually get it but not for the past week

  • I have been seeing your videos, I love them honestly.One question? If supposing I gave an integer x, can't I do it without using double?I just didn't understand this part.

  • Can't I used the int instead of double, I used it and the result is the same.

  • @mannaked Double means double floating point number, which means it is a decimal number with 15 digit accuracy. int is simply an integer, no decimals

  • MY! I'm learning a lot from you. REALLY! THANK YOU SO MUCH :)

  • Your tutorials make things a whole lot easier, thank you.

  • Thxx!

  • it's important to start off with the basics, in a simple and easily understandable way. if you want it to be more complex you can skip ahead where it's already assumed that you understand everything that was covered before.

  • Double (I believe) is appropriately named so because it holds twice that of a normal float (or around about).

  • 12 people thought the "disliked button" was the "download button" . Sorry Bucky!!

  • @reza100100100 no they though it was "dis I like"

  • @reza100100100 They must be really retarded - Like you.

  • cout << " 12 people thought the disliked button was the compile button " << endl;

  • @reza100100100 14 people

  • don't make this 2 year old child programs...

  • @jniroshsl These are tutorials for people that have zero programming experience idiot.

  • hey, sqrt !! this s baba class. make tutorial us ur mind. don't make this 2 year child tutorials......

  • @jniroshsl i just strted c so.. y u being a dick faggoy

  • These tutorials are so awesome that my virus scanner says it is a Trojan

    when i compile+rune (f9) my shit xD

  • lol after compiling and run... WALA.. my anti virus pop-up. not the cmd. xD

  • @xXHeartlessRikuXx

    same thing here... :)

    it compiles and the my antivirus pops out! :D

  • @xXHeartlessRikuXx why? thats completely no virus program clean :) or did you paste delete codes xD ?

  • when i tried to execute it my computer picked it up as a virus rofl! noob avg anti virus picking up anything that executes code as a virus sigh...

  • I'm taking Intro to Computer Science right now, and this is very helpful. It helps alot when you explain what words like "double" mean. My instructor will type it in and not explain what these things do, and by the end of the class i'm lost. So thanks.

  • heheeeeeeeee Squarerooot is a funcion..

  • fudge in the last video the code was smaller now i cant code while dev c++ window is beside

  • I got a trojan horse on my pc because of you, thanks

  • @nickrun1

    You are retarded

  • @nickrun1

    +1 for the people hating on you, I love thenewboston.

  • @nickrun1

    get linux

  • @nickrun1

    how the f can u get trojan from doing what he dose?

  • Double supports more integers 

  • What do you mean with double? anyway, thanks for all fantastic tuturials :D

  • Thanks for all your great effort and hardwork for making these tutorials.

    these tutorials are nice and clearly explained. Keep up the good job.

  • double = double precision

  • Can't you declare num1 and num2 in the same line separated by a comma? as long as they are of the same variable type.

  • very wierd when i try to "compile & run" it my anti virus program says i got a trojan horse from the file :/

  • Btw you can have the "using namespace std;" after the #include commands. Just clears up the main body.

  • Thanks a lot! Your videos are great!

  • Yes. Don't stop cause of haters. The only people that hate on people that make tutorials are people that don't have the mental capability to learn anything new.

    If you are guilty we hate you. You are a bad human and do not want humanity to continue to improve. We all hate you. :) This gay is good. Its is sometimes very hard to understand something like this. and just by getting told the same thing by a person can make it clear.

  • wow I'm a dumbass!!! build this in main.m and iostream and cmath are "no file or directory" and using, cout, cin are "undeclared"

    6 zip(nothing) so far........

    but I'm not giving up, see ya's next lesson!!!!!!!!

  • And everyone, be sure to jot down notes in your notebook or whatever, it helps :D

  • I did this but when I try to compile it gives me the error "no match for 'operator>>' in 'std::operator<<

  • loool

    AVAST say that these .exe is a virus ?!? i think avast dont like c++ ...

  • lol avg though it was a trojan

  • @PSKuwaity He's probably just sleepy :) try to up the volume, it works for me

  • when i run its ok than i type number and its close plz help me :-(

  • @fahadjahandad remember to put cin instead of cout 

  • @fahadjahandad at the end before closing the parenthesis use  cin.get();

    I have to use it twice sometimes dunno y im still a newbie myself :P

  • where's the "what's going on guys" at the start?:(

  • id rather listen and watch his videos , then sit in my universities c++ course

  • @jalonzo31 But this stuff is like grade 10 computer class stuff??

  • @ImAllFact Not exactly. When you learn a new subject, you often get into the basics first.

  • 12 people are 3rd graders trying to learn this

  • clarify double = include numbers on both sides of the decimal point while int mean not including .003849092 or anything like that or error!

  • @mylifeis2coolcmc2 Could you dumb it down a bit for me...

  • @theif519 int means the front side of the decimal point while double means both sides of the decimal point

    int 4545.

    double 4545.4545

    :P LOL

  • When you picked 81, why didn't you pick 20? :D

  • @AnttoHackz 20 isn't a perfect square.

  • my thing say Trojan horse Generic20. AKRI after i save the thing wtf

  • after doing this it say there was a trojan in my computer something about 20 idk what the hell is that

  • im confused when i type it one way it calls it a troggen virus

  • Suggestion : Use Microsoft Visual C++!!!!!!!!!!

  • you could also use <<" \n "; to get a new line instead of endl;

  • you could also use __ <<" \n "; to get a new line instead of endl;

  • C++ rules. With c++ you have to have a licence or something to make programmes to sell? So I started learning python which is easier lol.

  • system ("pause>nul");

    this will not show the press any key option

  • Man, great examples. I play with my code in all ways after each video. I make my GF mad with my jokes ; )

  • thanks for all the info and useful tips! youre saving me alot of monney... books are a thing of the past! XD

  • Wow this would have been usefull back in the eigth grade. lol

  • OK so this guy is giving tutorials on c++ and he doesn't know why they use the word "double" for a numeric or even why you would use a double rather than another type? WTF?! Are you guys really going to watch these?

  • @picasso566 nobody's making/asking you to watch these videos. If you don't like the types of info provided in tutorials, either provide helpful criticisms/comments or don't continue to watch the video. Simple.

  • @picasso566 Oh yes, we ARE going to watch this! If you can do better - why don't you, you miserable prick!

  • yo first of all i would like to thank you for all the vids i have been looking for c++ tutorials and your ones are the only ones that make sence,

    second your c++ compiler has some sort of auto compleat how do you turn that on

  • getting an error when using cin

  • Comment removed

  • Comment removed

  • example double variable; //The variable may has decimals example 2.3

    ex. cout<<"you can also use \n";

    ex. cout<<"instead of using "<<endl;

    ex. cout<<"Because they both mean the same thing. \n "

    ex. cout<<"Also the 'pause' in system needs to be in CAPS." \n;

    ex, system("PAUSE");

    ex, return 0; //Program was successful.

  • the people that dislike the vid ...... they mean dislike= dis i like thumbs up if u agree

  • can u do my project ? lol

  • scuse me, but what is the point of using double instead of int for the variable? im confused on that point

  • @Mattisbehindyou with double you can have decimal places. int does not let you use decimals.

  • @Jill0wnZ

    thanks!

  • Can you please help me with this problem ..

    youtube.com/watch?v=g3tXRQvHek­g

  • When i run mine it says "'sqrt' undeclared (first use this function)"

  • @lifematch or you could just use the "\n" (backslash) in the "" , like cout<<"let's party\n";cout<<"alright"; , it does the same ;) A better example is if you want to display more things all one under another: instead of cout<<"a"<<endl<<"b"<<endl<<"c­"<<endl<<"ashdg"<<endl; you write cout<<"a\n bn\ c\n asdhg\n". It does get very usable when you're working with structures, especially when you want do display them. And btw, great video, anyone could easily learn c++ from this, anyone ;)

  • @karmincernescu sorry but i didn't do this video. but yeah i kno that. i m a 2nd computer systems engineering and we're doing pretty advance stuff in c++ now. lol. yeah as you go further in c++ you learn more and more shorcuts like "\n" instead of endl. or the fact you don't necessarily need to put {} in an statement like 'if' if you have only one line of code. e.g

    if (count<o) count ++;

    instead of

    if (count < 0) {

    count ++;

    }

    :)

  • It would be more efficient from the point of view of assembly to get rid of your num2 declaration completely, and in your cout have "cout << "the square root of: " num1 << " is " << sqrt(num1);

  • its funny if you put a letter.

  • cool

  • Yes Bucky, please do more videos just like u did Java :) and let say, i do appreciate what ya do truly do thank you

  • Your freaking awesome. You break it down for us S-lo-W peeps. Only of change though...stop saying "as you can see" lol you sound like a magician Ta DA!. Good work though I am learning a lot.

  • The code was also working without cmath here...

  • @sijmenjan not for me

  • For all of you who don't know about C++ . com , it explains the meaning of "double" and slot of stuff Boston doesn't include in his videos, not that Boston isn't awesome :-)

  • Is there a difference between "int" and "double"

  • @Drav1212

    Yes. An integer can only store whole number, for example 10 or 20. If you try to put 2.9 into an integer it only stores 2. It doesn't even round off.

    A double instead ("Double Precision Float") can store the 2.9. It keeps the .9, unlike the integer.

    A double can store 13 decimals. So it can store:

    0.1234567890123. If you type 0.123456789901239, it will round it off to 0.1234567890124.

  • @Drav1212 integer holds whole numbers like 1 2 5 0 and negative nubmers aswell like -2 -5 -7

    Double holds decimal numbers 6.2 435.6 etc

  • Just respect what this guy is giving us, u can`t get this information that easy,

    Thanx for posting all this video`s, and pls don`t stop making video`s, and don`t care about the haters.

  • Hard to understand it from a video IMO, maybe I should choose this as an extra-curriculum class in my freshmen year? :3

  • @marcoantoniomirandar get some free ebooks online and try to read and learn from it, i did have c++ in my curriculum but in the end i did only get basics, its still the ebooks and these kind of vids that really help me alot,^_^,. and btw practice is the key^_^,.

  • this really helps alot! i watched many of ur tutorials ur the best user on utube that makes tutorials im sure in that! thumbs up if u agree

  • instead of  typing

    double num1;

    and then type double again to make to doubles just make them like this

    double num1,num2

    its much easier if you have like 10 doubles