Cant you do a system.in().function in java instead of importing scanner all the time? I was just curious, not saying Scanner isnt hard, but it seems ineffective to use all the time...
thenewboston maybe u shud tell people that u can add another integer and name it blah (for example) then u can say cout << (your original integer) + blah; This makes it so it can + two answers u want
i know you probably dont read comments from these old videos, but how much mathmatical knowledge do you need to become skilled in C++. Cause i would like to do a Unversity course in C++ and you need a high qualification in mathmatics, but i can do an exam after year 1. but is it difficult to understand and use effectively.
Everytime I put in "using namespace std;" it gives me an error! It says syntax error before namspace or "using undeclared" then it says all my cout and endl stuff are undeclared!
i tryed a different method of my own to see if it worked, i changed like 2 lines around and it works! i cant believe im ACTUALLY learning coding now!!!
I do all that code, except instead of using system("pause);
I use cin.get();
When I debug, type in a number and press a number it just closes without printing the new number. I'm guessing it has something to do with using cin.get();
I used it because some guy said to use it in a previous tutorial.
Just in case you still want to use cin.get(), which is preferable.
You have to copy cin.get() and use it twice because when you press return for the first input, you get an echo, which causes the first cin.get() to end, so you need the second as a buffer.
When I type a string to assign a value to gregsnum, it outputs a bunch of numbers. I understand That we declared gregsnum an integer, but why wouldn't c++ give me an error, instead of giving me a large number?
great tutorials but i have a question. I copied the code exactly as you have it on the screen, but it still comes up with errors. I did not copy anything wrong or make nay typos. Im using Microsoft C++ 2010, and I have no idea what i did wrong
@sportsguy831 I had that problem too, but then I installed the program again , and it worked , but my program is Dev-c++, I hope this solution can help you too.
I spent a month trying to learn C++ off of some site and I just ended up in fustration. I go on youtube and I find one of the best C++ tutorials in the world. I'm definitely watching all of your videos.
how to syntax if I want the user input to be not visible or it will not print out on the screen while they are typing it and after but the program will read it?
if this is difficult to understand a very good place to get some logic (logic meaning a base of knowledge of how code works) on scripting and code, try batch files first. extremely simple, and it can really help you get some understanding on how c++ works as well.
Guy's watch this video, then just review byyourself and check if you get error? Try to fix it byyour self and keep reviewing the video. I understand steps 1 - 6 Perfectly by heart I also jotted down notes of reference.
Hey, I know I've left like 20 comments in total in your videos, but here's the 21st!
I love your tutorials so much! You explain everything so well and keep everything going at a nice pace! You deserve so many more subscribers and video views than what you have, but the people who do watch your videos appreciate them ALOT!
hi can anyone hel me i do not how to use switch statement i have to make a program that calculate sale taxes using switch statements.first it will ask for base price and category. the category is 1=0% 2=2% 3=5% 4=8.5% and it will print the tax amount and the total to be paid and it will exit at category 5. thanks.
Thanks so much! These are very helpful. I am learning Java, and started switching over to C++. It looked like hell at first, but your tutorials take it slow and explain things very well!
if when u enter the value to ur variable and press enter the console closes, youll need to add an if statement to your getchar() (assuming your using getchar())
if(getchar() != '\n')
{}
getchar()
this is saying if getchar() is NOT equal to return run script which is nothing as the paranthesis don't contain any code.
The "press a key to continue" in the cmd window is caused by the line of c++ code before "return 0;". the part where it says "system("pause"); causes it to say press any key to continue. did i answer your question or no?
Comment removed
armyman527 2 days ago
now i can program......O M G shall i be a hacker one day
khayyam18 1 week ago
cout << "Thanks for the tutorials!"
BadGamingYT 1 week ago in playlist C++ Programming Tutorials from thenewboston
@BadGamingYT You forgot ";" at the end :P
TheVista1995 1 week ago in playlist The New Boston C++
cout << "Very nice tutorials. I am learning Java at my college and this is very easy to understand from a Java background.";
int yourlevelofawesomeness = 9000;
cout << "Your level of awesomeness is over " << yourlevelofawesomeness << "!!!!!!!" << endl;
BlackBird941 1 week ago in playlist C++ Programming Tutorials from thenewboston
i used to take arrows to the knee but then i took an arrow to the knee
Youfailednoob1 3 weeks ago
Very nice wotk man
cout<<"13 people just misclicked";
GaZaK1aS 1 month ago
thnx man really appreciate you!
cout << "love your videos keep it up";
Aman78628 1 month ago
thanks for doing all these videos for us! really appreciate you!
STLrecord 1 month ago
cin >> whatevertheintis; doesnt work for me D:
The program '[9128] name.exe: Native' has exited with code 0 (0x0).
Decodeish1 1 month ago
cout -- "you make this very easy to learn; --endl;
mcSavagekilla 1 month ago
@IANR632 Everybody used to make arrow to the knee jokes, but then NORMAL PEOPLE RAGED
Boddle12 1 month ago 9
I used to program computers.... but then I took an arrow to the knee!
IANR632 1 month ago
tytytytytytytyty
N1tr0usGaming 2 months ago
13 people have windows 98...F**KING WINDOWS 98!!!
lawlawlawlawlawlolz 2 months ago
20/20/20/20/20
sry iam trying to deel with it :D
MrMohamedibra 2 months ago
@MrMohamedibra 0,000125
CloudDecim 2 months ago in playlist C++ Programming Tutorials from thenewboston
Comment removed
MrMohamedibra 2 months ago
Cause In this tut it appears that yu can use cin(C++ version of system.in from java) and seeing as how both langs r similar, itd make sense
zehawk1 2 months ago
Cant you do a system.in().function in java instead of importing scanner all the time? I was just curious, not saying Scanner isnt hard, but it seems ineffective to use all the time...
zehawk1 2 months ago
thenewboston maybe u shud tell people that u can add another integer and name it blah (for example) then u can say cout << (your original integer) + blah; This makes it so it can + two answers u want
GamerTopHat 3 months ago
Learning from scratch and so far yours are the best tutorials I've come across so good on ya.
xxYetterxx 3 months ago in playlist Liked
Please become a teacher! You'd be a great one, you cut the crap and explain stuff well.
XXFailzzzXX 3 months ago in playlist C++ Programming Tutorials from thenewboston
Using cin.get() instead of system(pause) the program closes as soon as I hit enter (to enter my input), what do?
Tokiopopski 4 months ago
@Tokiopopski nvm, using cin.get() again fixes it
Tokiopopski 4 months ago in playlist C++ Programming Tutorials from thenewboston
@Tokiopopski System("Pause");
CloudDecim 2 months ago
Great stuff. Helping me through foundation degree. Best C++ video yet.
skidpanking 4 months ago in playlist More videos from thenewboston
i won't cin >> name
so they have to put in their name...
but if i use that value
it's a number?...
how to fix it?
arnoturelinckx 4 months ago
@arnoturelinckx string name; cin >> name; cout << "What you wrote:"; cout << name <<endl;
instead of using int, you use string, remember to declare it first, before you get the user to initialize it.
iRepentance 4 months ago
tutorial 1-5 my first 3hours of programming lectures and seminars condensed into about 25mins
Manwith2life 4 months ago
i know you probably dont read comments from these old videos, but how much mathmatical knowledge do you need to become skilled in C++. Cause i would like to do a Unversity course in C++ and you need a high qualification in mathmatics, but i can do an exam after year 1. but is it difficult to understand and use effectively.
Thanks :-)
UNSFRenegade1 5 months ago in playlist C++ Programming Tutorials from thenewboston
it says on line 8 " C:\Users\Nick\Documents\ex3.cpp `cout' undeclared (first use this function) "
idk what to do i put literally exactly what he put and checked it several times. using the same compiler.
ntaylor1991 5 months ago
@ntaylor1991 check if you hav ; on everyline
tgm09 5 months ago
what does 'gresgsnum' mean? can somebody answer please?
MrMusta95 5 months ago
@boogieman626 Check that you have put the semicolon at the end of the previous line
TheJQKteam 5 months ago
Thank you !
3croN 5 months ago
@TheRush905 Black Hole.
clannoobz 5 months ago
13 faggots
NoamElBaZ 6 months ago 41
@TheRush905 It crashes :D
strpk0 6 months ago
Guys just a little tip.
If you want to add a new variable which includes the old variable value such as when he writes: 'gregsnum = gregsnum = 20;'
Another way of writing this is to say:
gregnum += 20;
The + is basically saying gregnum + 20. If instead you would like to minus a number you would replace the + with a -.
Hope that helps.
viral262 7 months ago
"Sorry, my favorite number is 20. So, deal with it..." XD
alexkproductions1 7 months ago
Everytime I put in "using namespace std;" it gives me an error! It says syntax error before namspace or "using undeclared" then it says all my cout and endl stuff are undeclared!
AutomatonGames 7 months ago in playlist C++ Tutorials
@AutomatonGames Put the ; thing at the end?
AstralVids 6 months ago
@AstralVids Yep
AutomatonGames 6 months ago
@AstralVids I ffxed that error though I think.
AutomatonGames 6 months ago
These videos are perfect when studied along with C++ Without Fear version 2
Slywolf1992 7 months ago
@EpilepticElbow hows that going.
Tomahawkinmasta 7 months ago
You can just use char f; cin >> f if using cin.get() is problematic.
MrJepcats 7 months ago
Well, I saw first 17 Java programming tutorials so this is easier if you know little bit of Java
Dombamatic 7 months ago
Int Variable;
Variable = Awesome;
cout <<"Bucky you are";
cout << Variable;
cout << endl;
Compile
lowIQ04 7 months ago
if you used cin.get (); instead of system("pause"); you have to type
cin.get(); two times instead of one.
kurrethegs 7 months ago
cant you use /n instead of the endl statement?
dagr8master 7 months ago
@dagr8master Only if you're using it within quotation marks. You can't add \n after a variable.
Duodecillian 7 months ago in playlist C++ Programming Tutorials from thenewboston
thumbs up if you are learning more from him than at school x3
TheLegitiment 7 months ago
This is same as tut 4... D:
chippy257 7 months ago
Great tutorials. Thanks a lot
BiggBenn56 8 months ago
Not studying from this awesome guy is a ''cin''
hardik20111 8 months ago in playlist C++ Programming Tutorials from thenewboston
This comment has received too many negative votes show
I wonder why he loves 20.
press like.
mannaked 8 months ago
Buckysfavnum = 20
MrNightmarerh 8 months ago
Thank you!
ChairmanMarc 8 months ago
I'm very thankful
JabneelSlashCruz 9 months ago
I made a calculator with only tutorials up to this point. LOL.
Kulopto 9 months ago
i tryed a different method of my own to see if it worked, i changed like 2 lines around and it works! i cant believe im ACTUALLY learning coding now!!!
instead of gregsnum = gregsnum + 20
i just put cout << num1 + 20 << endl
spyroglitcher 9 months ago
@spyroglitcher
I made a calculator with only tutorials up to this point. LOL.
Kulopto 9 months ago
Hi bucky, I'm very proud of u. great job. well presantation. continue....
thanks for the tutorial.
jniroshsl 9 months ago
I do all that code, except instead of using system("pause);
I use cin.get();
When I debug, type in a number and press a number it just closes without printing the new number. I'm guessing it has something to do with using cin.get();
I used it because some guy said to use it in a previous tutorial.
deenotheman2 9 months ago
@deenotheman2 Follow the boss Bucky when you are watching his tutorials :D
thenishanth420 9 months ago
@thenishanth420
Yessir
deenotheman2 9 months ago
@deenotheman2
Just in case you still want to use cin.get(), which is preferable.
You have to copy cin.get() and use it twice because when you press return for the first input, you get an echo, which causes the first cin.get() to end, so you need the second as a buffer.
williamforcier 9 months ago
my favorite number is 13 :P
just kidding
thanks for these great tutorials :))
Emisa000 10 months ago
What's the difference between c, c++, c# etc?
SeeEssThree 10 months ago
"its my favorite number so deal with it" lol
dylondragon 10 months ago
cin>>
cout<<
Just posting this for a reminder.
Aleksandrme 10 months ago
thanks for the simple, to the point tutorials... Me and my friend are 12 and 13 and we both understand this
YZB25 10 months ago
This has been flagged as spam show
#cpphelp on irc.mibbit.net, webclient at mibbit.com
for live help :P
cplusplus0x 10 months ago
When I type a string to assign a value to gregsnum, it outputs a bunch of numbers. I understand That we declared gregsnum an integer, but why wouldn't c++ give me an error, instead of giving me a large number?
WoodbridgeJerkers 11 months ago
What is gregsnum , heheheeee...
hammadghulam 11 months ago
plz help me... i use cin.get(); but it closes inmediatly when i press enter. how do i keep it going?
Addison199666 11 months ago
@Addison199666
return 0;
4Got10Shadow 11 months ago
I'm learning more from you than the shit school I pay 2,300$ a month to go to.
EyeTheOf 11 months ago 109
@EyeTheOf Wtf? 2,300$??
TheShiftingStudios 7 months ago
@EyeTheOf SHIT YOUR LOADED
transformersloverjon 7 months ago
@EyeTheOf cout << Ditto
DeejayTorik 5 months ago in playlist C++ Programming Tutorials from thenewboston
I'm learning more from you than the shit school I pay 2,300$ a month to go to.
EyeTheOf 11 months ago
This has been flagged as spam show
I don't know why I can't compile it, it always shows a red x
I don't know where the problem is!
shadowprimita 1 year ago
Comment removed
shadowprimita 1 year ago
Comment removed
shadowprimita 1 year ago
Comment removed
shadowprimita 1 year ago
Comment removed
shadowprimita 1 year ago
Great, great, great, great, great, greaaaat!!! Thank you a lot!!
gumiszarvas 1 year ago
why doesnt cin.get() work for this one? [
orlean22 1 year ago
I always thought CIN meant Command In and COUT meant Command Out.
OyonTheAdept 1 year ago
my favourite number is 69
WillingToPooNvm 1 year ago
youtube wont let me post the code
sportsguy831 1 year ago
great tutorials but i have a question. I copied the code exactly as you have it on the screen, but it still comes up with errors. I did not copy anything wrong or make nay typos. Im using Microsoft C++ 2010, and I have no idea what i did wrong
sportsguy831 1 year ago
@sportsguy831 Then post the errors
cplusplusish 1 year ago
@sportsguy831 I had that problem too, but then I installed the program again , and it worked , but my program is Dev-c++, I hope this solution can help you too.
shadowprimita 1 year ago
i dont know why but when i try to run and compile this, the Hey now brown cow comes up. lol so wierd how do i fix this? its not even there
coolguyace 1 year ago
COUT >> - Program is sending or is going to send some informations (send OUT)
CIN << - Program is recieving or is going to recieve some informations (send IN)
nvidious1 1 year ago
why is it >> in cin ?
manga103 1 year ago
@manga103 its just the way c++ was programmed to regognise it
paraphernailia 1 year ago
Wow, this one was useful for the program im trying to construct. Thanks alot! ;)
XxPouringRedRainxX 1 year ago
i don't know why but my anti virus triggered a warning!!!!
LOve you tutorials i am gona watch them all
236hyden 1 year ago
i don't know why but my anti virus triggered a warning
236hyden 1 year ago
It surprises me that you didn't mention string variables a single time here.
MilleniumAtheist 1 year ago
lol my numbre XD
halogreg8889 1 year ago
I spent a month trying to learn C++ off of some site and I just ended up in fustration. I go on youtube and I find one of the best C++ tutorials in the world. I'm definitely watching all of your videos.
Umumu5 1 year ago
awesome tutorial
supertechguru 1 year ago
how to syntax if I want the user input to be not visible or it will not print out on the screen while they are typing it and after but the program will read it?
Adelbert1309 1 year ago
cout << "You are awesome.";
kIPTOX 1 year ago 37
@kIPTOX << endl;
dagr8master 7 months ago
if this is difficult to understand a very good place to get some logic (logic meaning a base of knowledge of how code works) on scripting and code, try batch files first. extremely simple, and it can really help you get some understanding on how c++ works as well.
pjwithbread8 1 year ago
SWEET video!
xBl00dBrothersX 1 year ago
WoW man your tutorials are the best, very well explained and nice step by step!!!
YBCstation 1 year ago
Your awsome dude.
I tried learning programming from those sites from India.
I gave up on India sites.
It was like trying to understand a man from Mars.
I can understand you perfectly.
adamtheblessed1 1 year ago
speaklouder!!!!
MrMobinga 1 year ago
i rather using \n and cin.get();
GuitarMafia94 1 year ago
Great tutorials.
TheArmogohma 1 year ago
When I type system("pause"); it doesnt work. I tried it with a space and no space between system and pause's perenthis. Thx! :)
oldtimegamelover 1 year ago
Thank you you make it really easy to learn. much appriciated
kikerisa12 1 year ago
trieed learning from a book not as good as your tutorials
shipsimulatorfreak 1 year ago
Guy's watch this video, then just review byyourself and check if you get error? Try to fix it byyour self and keep reviewing the video. I understand steps 1 - 6 Perfectly by heart I also jotted down notes of reference.
samham123456 1 year ago
cin = scanner in Java :)
MrOprea3 1 year ago
2:13 gets confusing
TheRealAuxiliary 1 year ago
cin.get() doesn't work when stopping the program D:
jeffery12108 1 year ago
@jeffery12108 why is that?
bubinasuit 1 year ago
@bubinasuit It doesn't work when you are using cin>>
jeffery12108 1 year ago
lol i made mine say"you have just received 8 dicks in ur ass
nonamerus 1 year ago
Greg is such a num-nuts.
Nuclearbomb8900 1 year ago
how do u make a string variable, i tryed str like in python but no go
hunter131211 1 year ago
@hunter131211
Char
thejerryshow1 1 year ago
Hey, I know I've left like 20 comments in total in your videos, but here's the 21st!
I love your tutorials so much! You explain everything so well and keep everything going at a nice pace! You deserve so many more subscribers and video views than what you have, but the people who do watch your videos appreciate them ALOT!
Thanks again!
EpicFatKid 1 year ago
hi can anyone hel me i do not how to use switch statement i have to make a program that calculate sale taxes using switch statements.first it will ask for base price and category. the category is 1=0% 2=2% 3=5% 4=8.5% and it will print the tax amount and the total to be paid and it will exit at category 5. thanks.
weroep 1 year ago
instead of just 'gregsnum = gregsnum + 20' just put 'gregsnum +=20' same thing.
DaUnknowna 1 year ago
this messes up when I use endl
system("pause");
narutospritemovie 2 years ago
Theres an error in: using namespace std;
hmmm :S
123emmy123 2 years ago
yeah using namespace std; needs to be above the function main
ANXIOUS117 2 years ago
Thanks so much! These are very helpful. I am learning Java, and started switching over to C++. It looked like hell at first, but your tutorials take it slow and explain things very well!
Daftpunkfan123 2 years ago
Thanxxx
Vic12876 2 years ago
Thank you Bucky for your well explained tutorials. [:
eaglepassdaily 2 years ago 58
@eaglepassdaily His name is Greg
BeatySword 1 year ago
if when u enter the value to ur variable and press enter the console closes, youll need to add an if statement to your getchar() (assuming your using getchar())
if(getchar() != '\n')
{}
getchar()
this is saying if getchar() is NOT equal to return run script which is nothing as the paranthesis don't contain any code.
Retard0800 2 years ago
First off Thanks for the tuts - just a quick question with the cin function
I was playing around and if you don't enter an integer (as gregsnum was declared int) one of the following seems to occur
Number value - converts to int (i.e. 3.3 --> 3)
string/char value - doesn't change default value of 2.
Is this normal - are there futher rules that should be taken into consideration??
thisuserhas 2 years ago
You need to use different variable types for input that isn't an integer.
Raethin 2 years ago
@thisuserhas
int is an integer and holds a hole number.
double can hold a decimal number with 16 decimals i think like 3.12345678
float can hold a decimal number with 8 decimals.
char can hold a single character 'a',
string can hold a string of characters "Hi Youtube"
Fjerdue 2 years ago
very good thanks
would like to see some more tutorials on more advaced stuff, that would be great
5thethriller 2 years ago
Great tutorials m8
LiLsNiP3 2 years ago
Error: The system cannot find the file specified.. :( pls hlp
(this also in compile log Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\Dev-Cpp\new.cpp" -o "C:\Dev-Cpp\new.exe"
Execution terminated
hsdgkas 2 years ago
you gotta save new projects first :P
Eiltis 2 years ago
another good tutorial!
nice and fast!
MrCavalleri 2 years ago 2
this bit didnt work for me for some reason
xPR0xH4CK3Rx 2 years ago
Thanks!
superbursihido 2 years ago
An easiest way to remember CIN and COUT is
CIN= Comment in or input
COUT= Comment out or output
g33ky898 2 years ago 49
see-in and see-out is how its pernounced
ANXIOUS117 2 years ago
@g33ky898 n00b
thecoolster28 1 year ago
@g33ky898
actualy it's console out and console in;)
UrosMarolt 1 year ago
@g33ky898
Actually it's like this:
CIN - Console Input
COUT - Console Output
;)
UrosMarolt 1 year ago 2
@g33ky898 thats how i did it
257joker 1 year ago
@g33ky898 actually, I recall it as console input, and console output :P
Funtasmia 11 months ago
@g33ky898 yeah useing exactly what the code means is a good way to remember it.....
diapysik 10 months ago
How do i remove that "Press a key to continue" thingy in the CMD window ? do i type system("pause <nul") like in batch ?
daeheadshot 2 years ago
The "press a key to continue" in the cmd window is caused by the line of c++ code before "return 0;". the part where it says "system("pause"); causes it to say press any key to continue. did i answer your question or no?
questionman5 2 years ago
well yes...and no, how do i remove it ?
daeheadshot 2 years ago
inline void KeepOpen()
{ char ch; cin >> ch;
}
int main()
{ KeepOpen();
}
ps: you don't need to return a value if your using the windows operating system at least thats how it is with the Visual Studio C++ compiler
ANXIOUS117 2 years ago
you're a good teacher, i know exactly what's going on now
hoyun 2 years ago 2
yea! it's not like some shity books or tutorials which just tell you to write down the code and they don't exaplain anything...
r3sp3c791 2 years ago
TheNewBoston is making an army of programmers!!
I love it! <33
:D
Reply to this comment if you agree with me : )
PilotCube 2 years ago 3
i believe
Soupmix21 2 years ago
haha... I've only watched 5 of these tutorials and now I'm making an averaging calculator
moderndrummer717 2 years ago
i kept forgetting the f'ing ;;;;;;;; and i wasn't sure what i was doing wrong
bigestsum41fan 2 years ago
this tutorial is helpful
while im 12 i can learn alot so when i grow big i know alot about c++
sevenmeyou 2 years ago
I'm 14 the stuff in these tutorials i think are knida common since.. still helpfull for complete begginers.
madmannbk 2 years ago
same thing i said about
luminifereousAether you too should have learned it when u were still a kid
but some kids only knows how to play
sevenmeyou 2 years ago
lol im 15 and im just learning all these stuffs i downloaded a book from internet but its kinda hard to read...thanks man these tutorials really help
luminifereousAether 2 years ago