hey, for 4:00, why did u put a space for salary and the battingAverage, but not for the age..like this " age=35; salary = 500000; battingAverage = .312; " does it matter if u do or not? and if it does, how would u know
Thanks for your replies,and sorry for my later ones. But the compiler never spit out any errors, just flashed red lines all over the place, but I gave up on learning from @LearnToProgramDotTV And just started reading cprograming(dot)com, seems more...infomrative in a sense, I like it a bit better. These Tutorials remain unfinished,a nd I honestly don't want to sit on me arse and wait for him to upload more, cause I know he's busy and all that, as I am. So I Moved on.
Hmm I went and downloaded dev-C++ and tried to do this little out put, but it won't read, and compile, I checked my code, everything is consistent, i even copy and pasted the int names age,salary, battingaverage, and yes i capp'd battingAverage like was told in the video
@CookieMonstersUnited means main doesn't take any arguments. he could just as well have main(int argc, char *argv[], char *envp) if he wanted to but void(or leaving it blank) is shorter to type if you're not using the args.
@vegardertilbake1 Check your code as carefully as possible. Make sure you capitalized battingAverage the same way throughout the program. If you want you can email me the code and I'll take a look at it!
@LearnToProgramDotTV Hi, thanks for replying. The problem was solved after i downloaded Setup Creator feature of Dev-C++. I dont know why but after i added that, i got a new problem. It sayed that it needed a " ; " before salary, so i added that. And it worked:) .. I have the 4.9.9.2v as you 2. Can it be a bug?
@pyropshere228 Java is all OOP, C has no OOP, Java cannot run without a JVM(java virtual machine) which makes it pretty much only useful for applications and applets, since system files HAVE to run on their own. Since C is neither OOP nor does it require a VM, it's extremely ideal for programming operating systems, among other things (windows and linux both are C based, and Mac also iirc).
@14thPianist You could have. It's equivalent. I like using repetition with beginners because it gives me more chance to talk about the basic concepts.
@LearnToProgramDotTV@LearnToProgramDotTV Hi. I find your lectures useful. Thanks. I downloaded the progam from bloodshed website and tried ur example. It worked (no error was shown) but I did not see the black result window. Please how can I activate this? Regards.
@leshkaka it appears he is simply showing the very basics of C programing. I'm sure if you watch all of the tutorials you will eventually see the bigger picture.
Hi I'm working on a program to convert input like 1280 to $12.80 but instead I get $12.8 which is the same result I get from 1208 Could you give me a hint please?
also i followed the instructions but slightly made them different i made a double for my amount of money and a double for my friends amount of money and then a float for total and made the coding total = myMoney + friendsMoney
Hey! great video. I am learning C also. Anyways, I was just wanting to know the use of the int main(void); also, like we do integers with (int) how do we insert words instead?
@Anupamkr96 int main(void); means our function returns an integer, has no arguments, and main is the name, in C there has to be a main function. and you would use a char data type for letters and words, for example, char ch = yourName;
I am using a Vista computer and am now realizing Vista doesnt have DOS -.- and im 15 years old and i understand this pretty well, only thing is its really hard to follow because ive never taken anything related to programming :(
i have re-typed.. printf("I am %d years old", age);
over and over for about 15 mins now and it's keeps saying there is an error - i can not find any syntax error in the print f command. however at the very bottom of the compiler it says.
'prinf' undeclared (first use this function)
(each undeclared identifier is reported only once for each funtion it appears in)
Thanks for your videos. i am 13 and i want to learn all i can about technology, including how it is possible to type letters on a computer from a keyboard and how those letters were put INTO a computer. But for now i'll start with game programming.
@TuningFreak23 probably to be explicit. sure its implied that there arn't any arguments to main but...its better to be explicit then let the compiler assume what you mean, XD
@TuningFreak23 Because the latest C standard requires that int be explicitly returned, I presume. The C standard does not require that a program "main() { }" be translated correctly, so you might get errors from that.
Your videos are good, but you should make the next video in the series a response to the previous one. Saves people from having to search through your videos for the next one.
C++ is a superset of C. Almost all C code will compile in a C++ compiler. C++ adds features, commands and libraries to C-- It does not replace what exists.
@PerfectkillClan C++ is backwards compatible with C, and the file type doesnt really matter, the compiler doesnt care, as long as there is compilable code in the file. hell, the file can have no extension if you want
"If you're gonna lie - lie big":-D
ILoveDoneri 4 days ago
i like your style of teaching a lot.
ItsJokkul 1 month ago
hey, for 4:00, why did u put a space for salary and the battingAverage, but not for the age..like this " age=35; salary = 500000; battingAverage = .312; " does it matter if u do or not? and if it does, how would u know
XxRohShamBohXx 1 month ago
@XxRohShamBohXx it doesnt matter
bondservant4Him 1 month ago in playlist More videos from LearnToProgramDotTV
getchar();
Doesn't work for me, i dont know why it doesnt ... help please
lewisself 1 month ago
@lewisself What environment are you using to create and compile your C?
LearnToProgramDotTV 1 month ago
@LearnToProgramDotTV It doesnt matter anymore, ive got it working still good totortials, shame you havnt done more on C
lewisself 1 month ago
alot of perspective gained from this
"thank you";
jjtheslayer69 1 month ago
Why did you put int main(void) in stead of main()?
401281 1 month ago
@ Sasha009000 it's actually spelled integer. And just look up algebra 1 or like the lowest math class available to find out.
backbaysailor 1 month ago
I got thousands of errors all saying something along the lines of 'printf' undeclared (first use this function)
97epicman 2 months ago
I added the getchar(); but the window still goes away.
arfirst 2 months ago
could someone explain to me how variables would be used in a game?
i know they are, i just cant think of how
lolJonezy 3 months ago in playlist Favorite videos
@lolJonezy Best example I can think of (and there are thousands of ways variables can be used in a game) is to store the score...
LearnToProgramDotTV 3 months ago
nice
cenyanboy 3 months ago
@LazyRpg what, you think games are 2d and 3d with cool graphic textures, story and music?
we started making games with C like guessing game, and string conversion. these are some of the original "GAMES" you're not talking about.
atlaswingpasaway 4 months ago
When im clicking compile and run nothing happens but i have no error types can someone help me
davidkiki3 4 months ago
@cptkostya
@MKShadowX
Thanks for your replies,and sorry for my later ones. But the compiler never spit out any errors, just flashed red lines all over the place, but I gave up on learning from @LearnToProgramDotTV And just started reading cprograming(dot)com, seems more...infomrative in a sense, I like it a bit better. These Tutorials remain unfinished,a nd I honestly don't want to sit on me arse and wait for him to upload more, cause I know he's busy and all that, as I am. So I Moved on.
AdrickCrimson 5 months ago
what did he add in between age and 35
sniperkidd347 5 months ago
heh, im twelve mark, i dont know what an interature is. im making a game with my friends that we might put up on steam.
Sasha009000 5 months ago
Hmm I went and downloaded dev-C++ and tried to do this little out put, but it won't read, and compile, I checked my code, everything is consistent, i even copy and pasted the int names age,salary, battingaverage, and yes i capp'd battingAverage like was told in the video
AdrickCrimson 6 months ago
@AdrickCrimson What did you typed in? because i had the same problem but i forgot the semi colon at the end or i guess ---> ; that :p
MKShadowX 5 months ago
@AdrickCrimson What errors did your compiler given you?
cptkostya 5 months ago
@MasTerZunDead
eekss! sryy... btw thankx... :)
illSaMlli 6 months ago
everytime my programe fails.... da msg shows "studio.h no such file or directory "
wt do i do??!
illSaMlli 6 months ago
ya why did you put int main (void) thats the only thing that i dont get
amperamp5 6 months ago
umm i put in my age is 14 then when i went to test it says i am 2 years old...
hallowgrave23 7 months ago
By the way, you can add "\n" inside the quotations of a printf command to end the line.
UnchainTheNight1 8 months ago
when i do the compile and run it goes back to ("hello, (my name)") and not ("I am 35 years old")
musikbrotha 9 months ago
@musikbrotha how do you mean?
bondservant4Him 9 months ago
how come u didnt put space between = and age, u put space between = and salary?
theco22wen 10 months ago
@theco22wen I was inconsistent. The spaces shouldn't matter... So feel free to add a space or NOT add a space. It should work either way!
LearnToProgramDotTV 10 months ago
This isnt too hard considering I already know Lua! :D
AutomatonGames 10 months ago
Love your Tutuourials , but could u please make ur fonts bigger in c++ through the settings so its abit easier to read
TheMrTeeJay 11 months ago
What is the sign by "i am ??? jears old?
Mrlalaez 11 months ago
Hey can anyone tell me what constant did he add after age..its somewhat like ""
MrJohnman100 11 months ago 2
i need a bit of help for this tutorial and the first one getchar(); wont make the console stay open i dont get any errors though
poiuu30 11 months ago
When you make a new project which one do you pick?
cablex4040 1 year ago
Void means there is no return data
torocity 1 year ago
Anyone there can tell me what void means? (I'm not english but understand)
BombayShow 1 year ago
Whats the thing beside age?
pumbaacat123 1 year ago
how did you make that little m next to age?
nvmabarai 1 year ago
Good tutorial but to learn in-depth I recommend cs50.net. Theses courses are from Harvard university.
Cs50.net
Jugdesi 1 year ago
what does in main(void) mean?
CookieMonstersUnited 1 year ago
@CookieMonstersUnited means main doesn't take any arguments. he could just as well have main(int argc, char *argv[], char *envp) if he wanted to but void(or leaving it blank) is shorter to type if you're not using the args.
CSryoh 11 months ago
not OOP ready my ass!!!! C is can totally be used for OOP.
CSryoh 1 year ago
Salary=500,000.
You can only dream...
InsaneNutjob 1 year ago
i get an error when compiling on
printf("I am %d years old", age);
what does this mean?
rangju 1 year ago
This is so awesome, im learning a lot..
FloppyEmperor 1 year ago
what is the symbol before 35?
you are typing it at 3:19
and how do you type it?
saddamsmadame 1 year ago
doesnt work work for me when i compile and run
andreassiok 1 year ago
i found doing the printf with declaring the values easier this way?
printf("I am %d, I earn £%d a year and my average is %f", age, salary, average);
vonsparks 1 year ago
@LearnToProgramDotTV Hey why does it say "Source file not found" when i compiled and ran it i wrote exactly what you did.
kirbyzthbackhe 1 year ago
thanks alot ... u really teach well..
MegaJunii 1 year ago
For C
Under C89, main() is acceptable, although it is advisable to use the C99 standard, under which only these are acceptable:
int main ( void )
int main ( int argc, char *argv[] )
For C++
The following are acceptable uses:
int main ( int argc, char *argv[] )
int main ()
The first option follows similar conventions to those used by C99.
The second option is used when you do not require access to the command line arguments, and is equivalent to the int main(void) option used by C99.
mQtek 1 year ago
what's the LETTER before d
("I am d years old", age")
johnmpek 1 year ago
@johnmpek it's "="
you can see it if use have HD resuolution
i woundered a while to
saddamsmadame 1 year ago
thanks a lot man.. i find it easier to understand you than my teacher.. keep it up.
enixal 1 year ago
I get an error in compile on battingAverage = .312; - It say "battingAverage undeclared (first use in this function)"
vegardertilbake1 1 year ago
@vegardertilbake1 Check your code as carefully as possible. Make sure you capitalized battingAverage the same way throughout the program. If you want you can email me the code and I'll take a look at it!
LearnToProgramDotTV 1 year ago
@LearnToProgramDotTV Hi, thanks for replying. The problem was solved after i downloaded Setup Creator feature of Dev-C++. I dont know why but after i added that, i got a new problem. It sayed that it needed a " ; " before salary, so i added that. And it worked:) .. I have the 4.9.9.2v as you 2. Can it be a bug?
vegardertilbake1 1 year ago
@vegardertilbake1 i get an syntax error in compile on salary
ashishkkrishna 8 months ago
I love what you are doing. Very basic. My teacher is good but he is a bit like Doc Brown so it gets hard to follow his logic sometimes.
Capa359 1 year ago
i keep getting an error when i go to compile and run and the error is on age
AionJunkie 1 year ago
@AionJunkie What is the error? sometimes the error is actually the line before the targeted line. make sure you put your ';'
Capa359 1 year ago
@crazynoob \n works in java too bud ;) if you know java, try out \1, 2 or even 3 and u might get a nice surprise.
buzzy918 1 year ago
@pyropshere228 Java is all OOP, C has no OOP, Java cannot run without a JVM(java virtual machine) which makes it pretty much only useful for applications and applets, since system files HAVE to run on their own. Since C is neither OOP nor does it require a VM, it's extremely ideal for programming operating systems, among other things (windows and linux both are C based, and Mac also iirc).
buzzy918 1 year ago
what's the difference between this and java??
pyropshere228 1 year ago
question, could'nt you just put "int age, salary, float battingaverage;" ?
14thPianist 1 year ago
@14thPianist You could have. It's equivalent. I like using repetition with beginners because it gives me more chance to talk about the basic concepts.
LearnToProgramDotTV 1 year ago 4
@LearnToProgramDotTV @LearnToProgramDotTV Hi. I find your lectures useful. Thanks. I downloaded the progam from bloodshed website and tried ur example. It worked (no error was shown) but I did not see the black result window. Please how can I activate this? Regards.
Markks100 10 months ago
@Markks100 tell me if your still having a problem ill send you the code to open the window
bondservant4Him 10 months ago
@bondservant4Him Yes. I am still having the problem. Regards.
Markks100 10 months ago
@Markks100 send me your code in a private message
bondservant4Him 10 months ago
thenewboston is better!!!!!
linkfan22 1 year ago
i just lovedddddddddd it cause i m also using the same programe i-e dev-c++
TheMortel16 1 year ago
Can someone tell me the meaning of what hes doing?
leshkaka 1 year ago
@leshkaka it appears he is simply showing the very basics of C programing. I'm sure if you watch all of the tutorials you will eventually see the bigger picture.
Capa359 1 year ago
Hello Mark, your method of teaching and material presented is clear and understandable. Thank you
EthioTronics 1 year ago
Hi I'm working on a program to convert input like 1280 to $12.80 but instead I get $12.8 which is the same result I get from 1208 Could you give me a hint please?
dying2l 1 year ago
@dying2l Well to me, $12.8 is correct, because it is still the same as $12.80.
wasitrealy 1 year ago
nice :)
ruthvikbs 1 year ago
nice :)
ruthvikbs 1 year ago
nice :)
ruthvikbs 1 year ago
your so good at your videos im 13 and doing this >.>
kilakun 1 year ago
Hmm, I guess /n only works in C++.
crazynoob11 1 year ago
@crazynoob11 Ohhhh it's \n not /n
crazynoob11 1 year ago
can you make a tutorial how to program c in a gui?
rahj8786 1 year ago
what's the different between double and float??
also i followed the instructions but slightly made them different i made a double for my amount of money and a double for my friends amount of money and then a float for total and made the coding total = myMoney + friendsMoney
and it worked =D
walid626 1 year ago
Your voice is amazing! lolz
Brandonmxb 1 year ago
Hey! great video. I am learning C also. Anyways, I was just wanting to know the use of the int main(void); also, like we do integers with (int) how do we insert words instead?
Anupamkr96 1 year ago
@Anupamkr96 int main(void); means our function returns an integer, has no arguments, and main is the name, in C there has to be a main function. and you would use a char data type for letters and words, for example, char ch = yourName;
(^_^)
itachisxeyes 1 year ago
I am using a Vista computer and am now realizing Vista doesnt have DOS -.- and im 15 years old and i understand this pretty well, only thing is its really hard to follow because ive never taken anything related to programming :(
Boing407 1 year ago
@3121username you would put printf(*i am %d years old* , age) ;
dragonforce1679 1 year ago
These are the best videos if your love C Programming tutorials!
ShadowhuntRenzokuken 1 year ago
i have re-typed.. printf("I am %d years old", age);
over and over for about 15 mins now and it's keeps saying there is an error - i can not find any syntax error in the print f command. however at the very bottom of the compiler it says.
'prinf' undeclared (first use this function)
(each undeclared identifier is reported only once for each funtion it appears in)
why won't it work?
3121username 1 year ago
@3121username
I had the same Problem, had to rewrite the Whole File to fix it...
koolwalky 1 year ago
@koolwalky You probably forgot to include stdio.h
cloakdood 1 year ago
Thanks for your videos. i am 13 and i want to learn all i can about technology, including how it is possible to type letters on a computer from a keyboard and how those letters were put INTO a computer. But for now i'll start with game programming.
Dannyroy1221 1 year ago
Clearly Explained and great audi.
cicero60804 1 year ago
in summer after my examinations i will stay at home and learn from your tutorials thank you sir!!!!!
ManosWwe 1 year ago
i'm only twelve but thanks you can even teach me
gjwebdesign 1 year ago
I Love your Tutorials Man. Thank you so much for this :) Luv ur clear voice lol :)
FreshAnimeEpisodes 1 year ago
why didnt you do this with a little more us-american pride-accent?
21jumppp 2 years ago
and why float battingAverage and not int battingAverage . sry for my bad english
TuningFreak23 2 years ago
because you can't put floating points into int variables. floats represent a floating point value such as 1.23456 such and so forth.
l3m0np13 2 years ago
why did you write int main (void)( and not just main() ???
TuningFreak23 2 years ago 21
@TuningFreak23 the only real use for the void keyword as a parameter is in function pointers but even then, its not needed explicitely.
0121ryanh117 2 years ago
it's basically the same thing it just is there to remind you so for small program it doesn't matter.
l3m0np13 2 years ago
@TuningFreak23 main() = main(void)
FOOFlGHTERS 1 year ago
@TuningFreak23 "int main(void)" just coding style really, could be seen as good practice too I guess
FOOFlGHTERS 1 year ago
@TuningFreak23 probably to be explicit. sure its implied that there arn't any arguments to main but...its better to be explicit then let the compiler assume what you mean, XD
least that is how it was explained to me.
itachisxeyes 1 year ago
@TuningFreak23 the void lets the program know that nothing is to be returned so you wont need to type return 0; at the end of main
Capa359 1 year ago
@TuningFreak23 its standard ansi c - it is the correct way to do it
conorucd 1 year ago
@TuningFreak23 void means that theres nothing in it, it's useless. It's just like saying 89 is +89 (positive) which is the obvious.
Xaezes 1 year ago
@TuningFreak23 Because the latest C standard requires that int be explicitly returned, I presume. The C standard does not require that a program "main() { }" be translated correctly, so you might get errors from that.
n00peh 7 months ago
i get this wen i compile and run expected `;' before "printf"
ooSVVAToo 2 years ago
@ooSVVAToo Check your code carefully. That simply means you mistyped something and there is a syntax error preventing compilation. Good luck
LearnToProgramDotTV 2 years ago
you are the great great man ,
your vids help me alot , as i am learning c++ in college and i dont understand what my teacher say ,
many thanks to you
sheaky420 2 years ago
@sheaky420 Keep at it! Learning c++ is not easy, but with effort and time you can do it!
LearnToProgramDotTV 2 years ago 5
@ooSVVAToo #include <stdio.h>
int main(void)
{ printf("Hello world");
getchar();
return 0;
}
Slycooper577 1 year ago
hey dude when i run it the black window dosent pop up why?
Z3ROProductionZ 2 years ago
@Z3ROProductionZ
Try adding at the very end (before the last brace):
getch();
return 0;
BufferOverflowAttack 2 years ago
getch() is not a standard function. use getchar() or fgetc(stdin) instead.
p00pindas00p 2 years ago
@Z3ROProductionZ .. Try This
system("PAUSE");
return EXIT_SUCCESS;
}
TheNammi1 2 years ago
Your videos are good, but you should make the next video in the series a response to the previous one. Saves people from having to search through your videos for the next one.
TheWakeUpCall 2 years ago 17
wtf saved it as a .cpp file when infact its c programming not c++ and it ran??
PerfectkillClan 2 years ago
C++ is a superset of C. Almost all C code will compile in a C++ compiler. C++ adds features, commands and libraries to C-- It does not replace what exists.
LearnToProgramDotTV 2 years ago
@PerfectkillClan C++ is backwards compatible with C, and the file type doesnt really matter, the compiler doesnt care, as long as there is compilable code in the file. hell, the file can have no extension if you want
FOOFlGHTERS 1 year ago
How come when I press compile and run it says "Source file not compiled" :(
XZXRogueXZX 2 years ago
Wow really nice video guys. Keep making more please.
XZXRogueXZX 2 years ago