@SpeedCubingCentral yes and no, in scanf you are storing that variable in a memory addresss thats why you need the ‘&’ because its a pointer pointing to a location in memory that u choose to store, but you can use an ‘&’ in other places if you wish for instance in a function parameter.
The only “confusing” part would be (for the ones not watching this realy carefuly),would be the execution of the program. Instead of “TOTAL” number of hotdogs eaten,you should put like “average hotdogs eaten” good tut
instead of saying loopcount = loopcount +1
it is much easier saying loopcount++
which has the same effect it adds 1 to loopcount every time the loop is executed
@bondservant4Him Yes, but unfortuently instead of running it in the background it opens the file up. Thankfully you can still go through the program while the music plays.
@bondservant4Him lol. I am currently using C++ and the simpliest way i know to use music is simply doing system(“MUSICNAMEHERE.mp3″); of course you would replace ‘musicnamehere’ with the name of the file. as far as i know it only works with mp3′ss but you could try a .wav
@howdouwin Later on when you get better there may be a situation where you want music to play while you’re in a certain pert of the game. the if statement will only play through the music once, where as a while loop will play the music over and over and over until you get past that part of the game.
Why did you declare loopcount twice instead of just initializing it?
As far as the average and total count of hotdogs, I’m sure it was most likely just a simple mistake. Thanks for taking the time to make these videos even if there is an occasional mistake:P
@mcholera1 Thanks, i just learned somethng useful from your comment and did not even watch the video yet
@bondservant4Him Ah, thanks, that makes sense.
@SpeedCubingCentral yes and no, in scanf you are storing that variable in a memory addresss thats why you need the ‘&’ because its a pointer pointing to a location in memory that u choose to store, but you can use an ‘&’ in other places if you wish for instance in a function parameter.
Do you only need to use a “&” when you are using “scanf” statements?
The only “confusing” part would be (for the ones not watching this realy carefuly),would be the execution of the program. Instead of “TOTAL” number of hotdogs eaten,you should put like “average hotdogs eaten” good tut
instead of saying loopcount = loopcount +1
it is much easier saying loopcount++
which has the same effect it adds 1 to loopcount every time the loop is executed
@bondservant4Him np
@Logart8 nicee man i never knew that thanks
@bondservant4Him Yes, but unfortuently instead of running it in the background it opens the file up. Thankfully you can still go through the program while the music plays.
@Logart8 does it work at the command line? when u run your program?
@bondservant4Him lol. I am currently using C++ and the simpliest way i know to use music is simply doing system(“MUSICNAMEHERE.mp3″); of course you would replace ‘musicnamehere’ with the name of the file. as far as i know it only works with mp3′ss but you could try a .wav
@Logart8 how would you go about adding music is that done in C?
@howdouwin Later on when you get better there may be a situation where you want music to play while you’re in a certain pert of the game. the if statement will only play through the music once, where as a while loop will play the music over and over and over until you get past that part of the game.
dude ive covered almost 3 chapters in my engineering computation textbook in less than an hour, EXCELLENT WORK!
where is this code??i didnt found it in your website..
Why cant you just use an if statement and not while? As in saying if the total number is <5.
can someone make a os without Assembly? and how hard is it to learn? and could I just put in a little code from someone else so my c code would work?
Thank you so much for uploading this videos .U made learning C programming so easy
@blakestrasel1 lolz,
in fact, the chinese can eat everything from those small cockroaches to persons like u as well…
@TheALPHAKILLER hey buddy, dont bother! it is dog, n ll remain dog, even if it is hot or cold…
lolz..
@TheALPHAKILLER – lolz…
hacking is different from this. Changing a few variables is much easier than the architecture of a whole program.
*GASP* u ate an average of 17 dogs ! :O .. DOG EATER !
jou’r a verry good teacher
Why did you declare loopcount twice instead of just initializing it?
As far as the average and total count of hotdogs, I’m sure it was most likely just a simple mistake. Thanks for taking the time to make these videos even if there is an occasional mistake:P