Hey Bucky, I am new to C++ programming and your tutorials are great. Thanks for sharing.
@bismuth83234 жыл бұрын
are you a programmer now? If You're where you work?
@sytnoff19 ай бұрын
where do you work now?
@guiltyspark133713 жыл бұрын
I've watched 23 of Bucky's videos in 2 days. I plan to finish the beginner tutorial in a couple of days.
@BuildezCraft10 жыл бұрын
you may not have 10000 dollars, but you are rich in knowledge :)
@Trolld6 жыл бұрын
ITS you may not have 10000 dollars, but you are rick in knowledge.
@austin163776 жыл бұрын
i might not have 10000 dollars, but I am morty in knowledge
@thefarreaches13714 жыл бұрын
I am not sure what you may or may not have, but grammar is a gift you yet to receive.
@Vorazun4 жыл бұрын
lol
@iteratedofficial3 жыл бұрын
@@thefarreaches1371 You may not be german, but you are for sure a grammar nazi.
@saiphkeencrest816312 жыл бұрын
I'm with you man, 16 here. Thanks to Bucky, I know many different types of programming. GUI Development and such is something I want to work on after I have finished all my basic text-based games (Already made an RPG based text game)
@Genuigr12 жыл бұрын
And you have perfect knowledge on how to use Tuna in programming!
@JetNmyFuture9 жыл бұрын
You said "Funner"! Kidding aside, thank you VERY much for the tutorials. They have been very helpful. Keeping it conversational makes it much easier to listen and soak up the information.
@Qazqi11 жыл бұрын
pow (lowercase) is a function in the cmath header that computes the result of a number raised to a power. ^ is the XOR operator, which is completely different.
@megadeth67819 жыл бұрын
My stock market simulator keeps crashing. Think about it.
@10YardCricket8 жыл бұрын
probably you can not be a good business man
@rajvijay32766 жыл бұрын
bear with it
@TheOriginalArchivist4 жыл бұрын
Sounds like some bull if you ask me
@anonamemous68652 жыл бұрын
You have fixed it?
@timyoung9562 Жыл бұрын
Thank u for making this video when i was 7
@ilikespaghetti21704 жыл бұрын
thanks bucky im falling down in a stock market rabbit hole
@carlosandino445810 жыл бұрын
I'll never program again in my life! give me the stock market baby
@NerdByFate9 жыл бұрын
Carlos Andino Then proceeds to watch Dave Ramsey's speeches and goes back to programming.
@schrodingerscat39129 жыл бұрын
+Carlos Andino Learn C++ before you get tied in the market. Considering a majority of that market is algorithmic C++ is the sharpest tool in the shed in the world of HFT.
@schrodingerscat39129 жыл бұрын
+NerdByFate Dave Ramsey is iceberg lettuce
@theseangle4 жыл бұрын
@@schrodingerscat3912 SomeBODY (#pragma) once (cout
@Klipperino10810 жыл бұрын
Thanks Bucky! I improved the program so you can enter your own values(investment money, rate, days).. So now its a real simulator :D
@soumithpotturi20909 жыл бұрын
the most entertaining video thus far.. guess what? He has just explained about the float data type in his 23rd tutorial !
@ishaanchauhan31697 жыл бұрын
You are the best teacher i have ever had. :D
@ObeseWizard11 жыл бұрын
Aaaaaah thanks I usually don't watch the last little bit if I get the concept. I was wondering cause a couple people had typed out comments about microsoft giving Bucky a bunch of money :P
@xcalibur064512 жыл бұрын
I'm just 12 years old, and thanks to you. I learned alot of C and C++! Thank you very much!
@mihirjha10782 жыл бұрын
damn bro you 21 now, me too. & im starting now
@Notsopwnedg12 жыл бұрын
In simple terms a float would be a "Shorter" decimal value and a double can hold a "Longer" decimal value.
@josephnasr33858 жыл бұрын
Wherever you go, whatever you do, however you do it, whenever you do... do NOT get into the stock market (talking from personal experience here). It's like gambling, you may win big one day, and lose everything if not more the next day.
@ShuyanStoryTeller8 жыл бұрын
Thanks. I will remember.
@VS-ic3by8 жыл бұрын
if u got your fundamentals right n be patient it will be like gambling bro
@VS-ic3by8 жыл бұрын
not*
@904nighthawk8 жыл бұрын
This is completely false, the stock market can be used right if you are smart enough to figure it out
@josephnasr33858 жыл бұрын
904nighthawk "can be" and "if you are smart enough". How many do you think are finance experts and graduates?
@TheAcidr31gn11 жыл бұрын
you would just not intialize the p or r. you would leave it float p; and float r; then do cin>>p; and cin>>r you would put these cin before the for() statement though because it will continuously ask you to input p and r till the eof (sentinal value) is met
@darshparikh32807 жыл бұрын
This stock market simulator is more like a way to calculate compound interest
@matthewgriffith20783 жыл бұрын
You can earn an average of 3% a day with a little studying. You just have to watch your losses and manage your risks and don't freak out on those days when you lose 7%(which is the most I would ever risk) You could set you losses at 0.25% if you wish. The stock market is still much better than losing 4% of your money every year to inflation. Thank you for the video!
@TexugoElectrico12 жыл бұрын
BTW - a (earnings) = p (investment) x (1 + r) ^ n (number of times the rate would be applied). a = p * (1 + r) ^ n, that's what Bucky means with a = p x pow (1+r, day)... So that's how you use an exponent :-)
@UjjwalKumarJha-raymando9 жыл бұрын
To be honest, this is the only video with some real content. I'd like another series of C++ tutorials where Bucky elaborates on the loops etc. and teaches things like Fibonacci Series, Factorial, HCF, Maximum out of n numbers or such others..
@zuesr32778 жыл бұрын
These are the basis things you should try them on your own Buckys information is enough.
@2marshtomp12 жыл бұрын
Well I'm 13 and this is my first programing language. Seeing you are alerady good with all these gives me hope!
@saiphkeencrest816312 жыл бұрын
Power. Like 5^2 means 5*5 (=25). Simply 5 squared
@ScantSphinx99 жыл бұрын
You can also use "double" in place for "float"
@Roedlundd9 жыл бұрын
Ye but it will take up more ram
@josephnasr33858 жыл бұрын
ScantSphinx9 My professor tells me "If you want to be a good programmer, you have to be stingy with your computer". In other words, you're using more space in RAM for nothing
@dibbiepk12 жыл бұрын
Haha, aiight, not too bad, since you just started, that actually pretty good, you are like the only person so far whos figured out my little challenge, want another one, to test ur skills?
@Qazqi11 жыл бұрын
Use std::setfill('0') and std::setw, both of which are in the iomanip header.
@ankitaroy7596 жыл бұрын
the thought of shoving everything into the main method kind of creeps me out . its good if you do stuff object oriented ( OO) way from the beginning. Heres what I did : #include #include using namespace std; class MyClass{ public: double cal(float p,float r,int days){ double sum = 0; for(int i=1 ; i
@ArxosXII11 жыл бұрын
You sir/ma'am deserve an internet cookie
@immichaelyeh12 жыл бұрын
instead of float you can also use doubles
@Person5385-w4s4 жыл бұрын
6:07 hehe, you got that right
@samirgunic8 жыл бұрын
The video that followed had like 10000 views less than this one. With all the talk about money and career choices, some people took that to their heart I presume.
@jeremiahb797511 жыл бұрын
If you would want to see the total amount of profits, just simply add "-p" at the end of "a = p * pow(1+r, day)". So that line of code should look like "a = p * pow(1+r, day)-p;"
@onursimsek60945 жыл бұрын
There is no need to use a formula etc . Add money * r to money and increment day .So : money += money *r ; day++ ; Because , during 20 days , our money will be incremented by money *r . And we will add this 20 times
@arkprince94137 жыл бұрын
i wonder what is this mean ? error: range-based 'for' loops are not allowed in C++98 mode
@SebSharma7 жыл бұрын
This also works: #include using namespace std; int main() { int invst = 10000; int earn = 0; int total = 10000; int day = 0; int final; for(int day = 0; day
@sayedsheikh8936 жыл бұрын
Another Way: float invest = 10000; for (int day =1 ; day
@LucaMorselli812 жыл бұрын
in that expression you use day but the correct one should be a = c * pow (1+r, year), you gained 2000 $ in 20 years not days...anyway thanks for the good tutorial
@EPKX11 жыл бұрын
he didnt say it in vlog; he said in an earlier c++ tutorial where after he made us write the program he said that we ould send it to microsoft and they would give you millions ( he was joking) , then at the outro he said see you guys later and ill go send this program to microsoft and get the millions of dollars.
@MrCanadianAviator12 жыл бұрын
Just remember, He could be making the games that everyone will play in the future.
@0ejmusik014 жыл бұрын
I don't know if Bucky responds to these videos anymore, or if anyone else knows, but it would seriously love to build a custom stock screener. Why? Because it would go far beyond what is available today as far as all the attributes I would build into it.
@SweetAlexMore11 жыл бұрын
"Ooohh mama!"
@Raisinbranncrunch11 жыл бұрын
is there a way to have all numbers printed out have a certain number of digits? i.e., could you get 9 to print out at 09 if you wanted all double digits, or 10 to print out as 010 if you wanted all triple digits?
@Danny_locs8315 жыл бұрын
Are float and double the same thing? Just making sure.
@turner77776 жыл бұрын
By the way if you assign a float like: float x = 2.34; This is technically a double(8 bytes of data) even tho you wrote float! if you want to create it as float (4 bytes of data) you have to do: float x = 2.34f; By adding an ' f ' to the end! EDIT: If you dont belive me try it yourself. Enable InelliSense if its not enabled and hover over the variable number ( float x = .02; ) ......................................................................................................................................................................................Hover over this ^^ and you will see it says (double)(0.02)
@Shrikky2312 жыл бұрын
Yeah you are right lol... But is this simple interest = stock trade? I thought SI = Principal amt x Numbr of years x Rate of interest
@Jack-424213 жыл бұрын
i always use "double x;" if i want to use numbers with decimal points. what is the difference between "double x;" and" float x;" ?
@Erox00612 жыл бұрын
please help !! mine's not debugging , it says "Stock mart sim - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
@DonaldEdits11 жыл бұрын
I always do, however it is not needed that was only in the older C++
@Raisinbranncrunch11 жыл бұрын
or would you just have to include an if statement like: if (day (less than) 10) {cout>>0>>day>>endl} no actual less than sign cause it's an html tag?
@khalidabdi95376 жыл бұрын
hallow teacher Bucky u just added #include but no explanation ?
@khalidabdi95376 жыл бұрын
oh u just did in 00:47 thank u
@LisandroGarcia869 жыл бұрын
lol dude I'm a computer engineer and im into investments, I have shares in different companies, the deal with stock market is that it's a risky game, yes the more you invest the more substantial you gain but the more risk of losing you have. Regardless if you invest in forex,stocks, commodities, bitcoin, it's a risk and gain, you have to do your homework, study the charts, predict trends before investing. Here is where your calculus comes into play. Sounds like easy money but it's not, it's good if you use it a supplement income though. Btw love your videos, have helped a lot in reviewing on my programming skills.
@LisandroGarcia869 жыл бұрын
Why are you interested? Who are you? What do you want? What is your interest in me? Do I know you? Why are you concerned? And why is it important for you to know what I major in or what I do? Are you business major? Do you own a company? How long you been in business if so?
@schrodingerscat39129 жыл бұрын
+Samuel Jin getting an MBA doesn't mean you can trade/invest financial markets well. it means you got a conventional education in business administration. An MFE, MQF, CFA, MSF is what you meant to say. Furthermore anybody can be a great investor with an adequate knowledge of the assets they are dealing with and a risk management model
@djleisheng7 жыл бұрын
I'm really interested in algorithm trading. I'm planning to go to university for software engineering. I'm studying calculus next year. You should make a video series on what you do, I'd be interested to watch it.
@dnd50196 жыл бұрын
Any body having trouble with pow get a error make sure you put in #include which is at the top hope this clear some confusion
@RionMusik12 жыл бұрын
so this is where all the smart kids spend their time
@notmelah13 жыл бұрын
I'm considering the stock marketafter watching this...
@thecubeman51975 жыл бұрын
I cant understand why we have to put the rate as 0.01 ?
@nathanabrogena61475 жыл бұрын
You need to convert the percentage to decimal or whole number or else your output will be different
@TheKingoftheriff6 жыл бұрын
Where are the rest of the decimals? Why are the numbers rounded to 1 decimal?
@beefydeadeye11 жыл бұрын
tried my own , didnt work , then tried copying letter for letter your code and it still says same error ...." pow was not declared in this scope".... Any help ? is this because c++ or code blocks may have been updated since this video ?
@nashuer281011 жыл бұрын
did you include "#Cmath"
@mahmoudadel76258 жыл бұрын
beefydeadeye I think you didn't include
@FingersBlazin8 жыл бұрын
when making variables is it better to just use r for rate , etc or is it better to use the whole name as the variable? Or does that break some kind of rules for writing simple elegant code?
@aaqibsoomro79238 жыл бұрын
Look man, 'rate' and/or 'r' are just names. You can even name any variable as whatever is in your mind. But just for your better understanding, it's good to give variables such good names like 'temp, rate, money, age' etc.
@FingersBlazin8 жыл бұрын
I re-wrote the code that way in my notebook so later I would remember this tutorial and what we were making. Thanks!
@seoulpeterson4328 жыл бұрын
So, in pow.. I'm going to assume, it's just like an exponent? But what is the comma for?
@seoulpeterson4328 жыл бұрын
Ahh, okay. Good to know, thanks!
@techno31457 жыл бұрын
Now my calculator can support decimals. You can use the advanced calculator or normal calculator. Then change the mode to add sub mult and div and enter two numbers, can be decimals, answer will be decimals too For the advanced calculator you can do average calc, multi step math and exponential math. Enter numbers and type 0 to quit, then enter a number to change the number of data value and get the average. Just keep typing numbers until you type 0 and it will add, subtract, multiply and divide all the numbers typed Finally enter two numbers and it will find the answer to the exponential math
@2marshtomp10 жыл бұрын
So what exactly does the pow function do again?
@mathewseldo577411 жыл бұрын
hey bucky i accidentally did not write include cmath but the program worked fine without it and with it
@saurabhpradhan24649 жыл бұрын
whats the difference between this c++ and turbo c++ ? thanku
@Videocu9 жыл бұрын
Thats what they call cumulative calculation . cumulatively adding in each step.
@Veldr0N8 жыл бұрын
Can someone help?I have a couple of questions. Does that r which is equal to .01 mean 1% ? Why do we multiply p pow(1+r, day) times ? Why do we add 1 to r ? Why do we put day at the end of that pow function ? Please help,i don't understand the logic behind this.Can someone explain the logic behind this to me ?
@olestrohm8 жыл бұрын
r is the percentage, yes. The reason we have pow(1+r, day) is this: p is the money you start with. and the next day you will have p + the money you earn from rates. the money you earn is equal to p * r, or the percentage times the money you have. so p + p * r = p(1 + r). And 1 + r is basically 100% + 1% (which r is equal to) so multiplying by 1+r you get the how much you have + how much you earn. so multiplying by 1+r once per day gives you the money you have after that many days. therefore (1+r)^day Hope this helps :)
@Veldr0N8 жыл бұрын
Thanks a lot.
@69anjan10 жыл бұрын
I am his(man on the img) son...i have learned java and now learin' C++.thx Bucky.I live in India and in class 10...i want to be a programmer in future.Again thx Bucky.
@notragescout11 жыл бұрын
And how do i make a program that will show me how many days will i have to wait if i earn 0.02 a day, my invest was 100 and i need a amount of 3600? :))
@MadOgre2212 жыл бұрын
Ok, I don't usually reply to comments but these kind of "standards" are what usually turns amateurs off programming. First of all there is no reason why you shouldn't use float in this example. It is perfectly ok. It is true that C++ interprets floating point literals as double by default, but float still has its place. Second of all data coercion here does not affect much in this example. With the current processor power available the couple cycles you would have saved are not worth the effort.
@Zahid-vx8cg9 жыл бұрын
buddy why u did not initialize the variable "DAY" which u use in for loop
@NerdByFate9 жыл бұрын
mir zahid He did initialize day, he simply did it in the "for" loop. The reason he typed "int day" instead of just "day" is because he had to initialize it.
@radnyx_games12 жыл бұрын
Wait. Is Sims short for Simulator?
@shadidhaque751811 жыл бұрын
what should I do if I want the option for the user to insert the value for p and r
@mohsinsaeed997 жыл бұрын
usually why/when do we use ?
@justvlaxx12606 жыл бұрын
I am confused why you used pow? Isn't it easier to just use your p and r variables and just make p = p + (p * r); ?? Sorry, I am very new to programming....but pow is confusing me in this example.
@TheaDragonSpirit12 жыл бұрын
I don't like using letters for names. :S I was always told to use descriptive words for programming. Been a while since I did any programming, wanted to catch up to the times but still... I think you should use more descriptive words, so that when you write a lot of code you don't get lost on what you wrote in the past and have to work it out, and so other people don't have to work it out.
@arturbella254412 жыл бұрын
Every single kid liked your comment because you said they were smart. Well played.
@UjjwalKumarJha-raymando9 жыл бұрын
Could someone explain me the formula? Bucky didn't elaborate on it much.
@zuesr32778 жыл бұрын
It's really simple to derive little guy.
@zuesr32778 жыл бұрын
Go to Wikipedia you will get some perspective.
@JustAnotherGuyOnTheWeb12 жыл бұрын
click the transcript button beside the "add to" and check out 2:56.
@FrankLopezx9 жыл бұрын
how do we download new libraries to visual studio 2013 ?
@blacktenshu11 жыл бұрын
how do I remember all those libraries. seems like a daunting task
@wfgigglemonkey13 жыл бұрын
I got an error: 'pow' was not declared in this scope. Help?
@dutch4fire2413 жыл бұрын
this tutorial threw me for a loop
@slayerq310 жыл бұрын
Actually there is a simple formula for this, you don't even need the power function and the complicated formula... #include using namespace std; int main() { float amt, rate, days; cout > amt >> rate >> days; cout
@UjjwalKumarJha-raymando9 жыл бұрын
slayerq3 This is simple interest, not compound interest.
@slayerq39 жыл бұрын
+Ujjwal Kumar Jha It is compound interest.
@UjjwalKumarJha-raymando9 жыл бұрын
+slayerq3 Try using both formulas. You would get a different chart.
@slayerq39 жыл бұрын
Ujjwal Kumar Jha You are right! Sorry, I couldn't remember correctly since I learned these formulas back in school :)
@UjjwalKumarJha-raymando9 жыл бұрын
No problem ^^ I had to google them up for a revision too..
@oduroemmanuelofori14332 жыл бұрын
That's very good and understandable
@Goku925110 жыл бұрын
what is the difference between using a for loop and while loop. I know for loop is better for mathematical but why? I was able to build the same program with a while loop since i am not very good at for loops yet. Thanks
@MrTypingsound10 жыл бұрын
I think the for loop is just quicker to write and more concise
@NecroPhase110 жыл бұрын
I know this was posted 2 months ago, but if you're still wondering a for loop should be used when the number of iterations are known, where as a while loop is best used when the number is unknown as it is designed to be broken when a specific value is given (e.g. -1). At least, this is what I learned from programming in Pascal, though I believe it's a fairly universal concept and therefore should also apply to C++. (Somebody correct me if I'm wrong! I'm still learning C++ too. :P)
@gtabrunogta11 жыл бұрын
You dont need to use pow() just forget the variable a and do p=p + (p * r);
@Globox82211 жыл бұрын
pow function confuses me. how does (1+r, day) get added together?
@Zilva8611 жыл бұрын
r = 0.02 1+r = 1.02 => 1+0.02 = 1.02
@محمدعمرمبارز11 жыл бұрын
why he did not declare int day first? is it true to declare a variable inside for statement ?
@EP_199011 жыл бұрын
It is not necessary to declare a variable inside for loop. One can declare it before the for loop or inside the for loop.
@محمدعمرمبارز11 жыл бұрын
thanks for reply
@NormantasK12 жыл бұрын
could u explain more about pow? Please.
@Metagross3112 жыл бұрын
whats the different between float and double?
@OnTopOfDreams11 жыл бұрын
wow just realized I learned this formula in my Business math class
@ENDY23811 жыл бұрын
i do not get he pow thing, is it a math thingy?
@jrM54926 жыл бұрын
can we use while loop instead?
@Suzee_BG11 жыл бұрын
Thanks guys!
@Suzee_BG11 жыл бұрын
How do you prevent the command prompt from closing?
@Anime179611 жыл бұрын
just add a return 0 at the end. If I'm not wrong, you have to include the "return 0;" depending on which 'c++ version' you have.
@austingates190011 жыл бұрын
U just include all of it in a while loop without a test just use true
@EP_199011 жыл бұрын
apart from other comments you can also try system("pause") statement. It pretty much depends on what version of C++ you are using.
@MLGBrownCat11 жыл бұрын
Why did he put .01 for r and 1+r under the for loop when you can just put r = 1.01 and pow(r, day)?