this will only work with y and n, as char is only for single charaters. so if i wanted the user to enter yes or no, what data type would i give the veriable?
@mottyg123 If you want the user to enter words like "yes or "no" instead of using "char" you would use "string" since words in c++ are known as strings and letters are known as characters and numbers as integers, etc..
hey bucky, I am a recent viewer of yours for c/c++ programming and I realized in this code you could have done a do while loop until the idiot lol gets it right
@LeetGamer4L Definition of troll: In Internet slang, a troll is someone who posts inflammatory, extraneous, or off-topic messages in an online community, such as an online discussion forum, chat room, or blog, with the primary intent of provoking readers into an emotional response or of otherwise disrupting normal on-topic discussion. Well I think we're done here.
I'm taking c++ now. I have two test left with, but I do find these videos helpful and easy to understand. Thanks for posting. However i'm taking visual basic next semester, and it would be great to see videos for that especially GUI's.
oh why are people braggining about their ages...big woop your learning how to write computer programs...big woop...seriously shouldent u be out partying and getting laid :P instead of wasting ur teen years doing this :S
@lanick3 Wasting your teen years? If you had not realised this is a hobby and if you learn this now then you will be better when you grow up. Think, most basket ball players started basket ball when they were kids and now they are pros. Same thing with programming.
@ValosTaonas The reason is because he's storing the user's answer as a 'char' variable, which can only be a single character or simple integer. There is a more technical explanation, but this should do. If you want to modify your program to accept a "Yes" answer, try using 'string' data type. NOTE: You will have to include the string header file in your program for this to run.
What I mean is that for some reason, when I put 'yes' as an option, it doesn't work if the user types that as the answer. I bet he'll address that in those later tutorials.
I've been watching these videos and I've been wondering: "When's he going to show us how to use 'char'?" Yay! Now I || we know (hehe)!
@ElPeester No, it can handle more than one character response. It would seem obvious that if you wrote 'Yes' instead of 'y' it'll take that instead, but thats just me.
@ThinkGoulash - Its below the backspace, above the enter, left of delete, right of this thing " ] " . If u find it press shift, then press that button
do {} while (answer != 'n' || answer != 'N' || answer != 'y' || answer != 'Y');
does not work, but
do {} while (answer < 'n' || answer < 'N' || answer < 'y' || answer < 'Y');
does
i would of thought it would of made sense to use not equal too 'y' or 'n' - I am keeping the program in a loop by the way so if the user enters anything other than y or n it waits until the right input is entered
wicked tutorials btw, ive learned alot over the last 4 hours!
OMG red your program so represents the real life situation with Hannah Montana.
while(montana=hot) will always be true because you keep assigning hot to her, = is the assignment operator and == is the equality operator. In the same way Montana will always be hot because people keep assigning hot to her, until someone inserts a "break;" statement into the endless loop Hannah Montana will always be Hot.
Seriously I wish I found your tutorials before I started my introduction to programming class. In three days I have my final exam and only now because of your tutorials am I actually beginning to understand these concepts.
You're the person who explains it best so far. But maybe I can make it on my own with what you've taught me. Thank you for the 20 tutorials you made and put your dedication into laments terms so everyone can understand.
Yes I do!
ninenine78 3 days ago
"Bean sausage" haha my question was do you like melons ? :D
UKAnder 1 week ago in playlist C++ Programming Tutorials from thenewboston
i find this eaier then java =D
N1tr0usGaming 2 months ago 2
basically, if you learned 1 programming language, other languages must be easy to understand.
instaant1 2 months ago 2
Word out to everyone. make sure you use single quotes for char's. I made that mistake at first.
rockerlkj 3 months ago
bean sausage? wut? lol
JoelakaDamian 4 months ago in playlist C++ Programming Tutorials from thenewboston 2
@TheCrazeBlazer actually it's only 9 tutorials and 1.7977 * 10^308 hours of practicing before becoming a pro.
colouredmirrorball 4 months ago in playlist C++ Programming Tutorials from thenewboston
Note that you have to use single quotations for some reason when comparing the char variables...
NehiThompson 5 months ago in playlist C++
Comment removed
Yikak4 6 months ago
this was was hilarious too much bucky lol
hdo697 6 months ago
I love this I made a puzzle game for shooting animals!!!
Via1tunes 6 months ago
THANK YOU FOR MAKING THESE FUNNY! i cant watch those bland tutorials!
SteakOfAnger 6 months ago
someone tell me if im correct or not?
this will only work with y and n, as char is only for single charaters. so if i wanted the user to enter yes or no, what data type would i give the veriable?
mottyg123 6 months ago
@mottyg123 If you want the user to enter words like "yes or "no" instead of using "char" you would use "string" since words in c++ are known as strings and letters are known as characters and numbers as integers, etc..
ultimateavenger 6 months ago
@ultimateavenger thanks for your help :)
mottyg123 6 months ago
@ultimateavenger thank you
valentass88 5 months ago
fanny about Montana))))))
Romk25 7 months ago
it work with the first letter of anythin so if i put "no whats wrong with u" it works
eddrocks2 7 months ago
@eddrocks2 lol
CheeseToastHax 7 months ago
only 9 tutorials to go...this is my second program language...
FreePKMNWalkthroughs 8 months ago 11
I though I was supposed to delete cookies, not eat them :\. Anyway nice tutorial :).
MrVBMagic 8 months ago
Hanna Montana is really hot.
eminemchu43 8 months ago
I told his mother, she spanked his ass.
mannaked 8 months ago
hey bucky, I am a recent viewer of yours for c/c++ programming and I realized in this code you could have done a do while loop until the idiot lol gets it right
AnthonyProductions09 9 months ago
I get this error message with this:
error: 'else' without a previous 'if'
Olemassacre 9 months ago
>using entire namespace
>including an unused header file
>using a system call
Done...
packetpirate 9 months ago
Comment removed
yoyo68y 9 months ago
And that's how you become a Perv Programmer lol
isaelradesky 10 months ago
I also learned that the first president was George Washington.
BenRyanGamer 10 months ago
oh thanks alot!
zhir96 10 months ago
Comment removed
jonmcd123 10 months ago
0:17 is that an order??
zlatkoseha 11 months ago
No... Hannah Montana isn't hot...
R4TH4CK3R 11 months ago
@samthemaz It makes an exe when it is compiled.
TheSoulAssassin20 11 months ago
@samthemaz
let me know if you find out
O4archer 11 months ago
I though he said Grilled Cheesus.. #gleek :P
kidburn202429 1 year ago
OR she could give you a slap, and tell you to piss off?
AtrianArk 1 year ago
LOL you really didn't want to answer 'y'.
krazYFaic 1 year ago 26
BEAN SAUSAGE HAHAHAHAHAHAHAAHHAHA
Jozekban 1 year ago
Just yeat a nother great video from The New Boston.
Keep it up Bro we are all greatfull. :D
SuperWatru 1 year ago
can anyone tell me whats wrong with this line? if ( answer == 'y' || answer 'Y')
sirspawnalot 1 year ago
@sirspawnalot you forgot to put == between answer and 'Y'
krazYFaic 1 year ago
This has been flagged as spam show
@sirspawnalot you forgot to put == between answer and 'Y'
krazYFaic 1 year ago
@LeetGamer4L Right, that's why he put "you fn perv"
HuskyMaster9000 1 year ago
This has been flagged as spam show
Best C tutorials at programmingforfreshers.blogspot.com
raghuace 1 year ago
Its spelled "you", not "u"....
LeetGamer4L 1 year ago
@LeetGamer4L Stop being technical smartass, he can spell however he wants
mcvdigital 8 months ago
@mcvdigital Definition of spell: "Write or name the letters that form a word in correct sequence" notice the "correct sequence" at the end?
LeetGamer4L 8 months ago
@LeetGamer4L Grow the fuck up. ever heard of texing? No friends huh? of course. And who gives a fuck
if he spelled YOU like U! ITS NOT A FUCKING BIG DEAL! It doesnt matter same shit! Fkin idiot.
mcvdigital 8 months ago
@mcvdigital roflmao
LeetGamer4L 8 months ago
@LeetGamer4L Definition of troll: In Internet slang, a troll is someone who posts inflammatory, extraneous, or off-topic messages in an online community, such as an online discussion forum, chat room, or blog, with the primary intent of provoking readers into an emotional response or of otherwise disrupting normal on-topic discussion. Well I think we're done here.
VictoriusDawn 8 months ago
mmmmmm grilled cheese
ahalaberton 1 year ago
"|" is called a "pipe"
ajmilazzo 1 year ago
@ajmilazzo i though it was vertical line
sirspawnalot 1 year ago
I'm taking c++ now. I have two test left with, but I do find these videos helpful and easy to understand. Thanks for posting. However i'm taking visual basic next semester, and it would be great to see videos for that especially GUI's.
marcohamp 1 year ago
if answer is no:
cout << "you fn gay" << endl;
1Alino 1 year ago
Please donate to Buckys christmas present 2010. See the general forum on his website for details, thanks :)
jazzninja77 1 year ago
Darn it. I've watched 20 in a row. Now it's 1:30am and I'm running out of bandwidth. I just love these videos. They make so much sense. :)
icekat83 1 year ago
Nothing like bashing at Hannah to make one remember about codes. xD
Anyway, nice tutorial. Worked as the perfect review for my exam tomorrow. :D
candychandelier 1 year ago
good job on making 20 videos which in total show what you could fit into 1 video.
BTW: I want Cookies && Grilled Cheese.
chickenpotato12345 1 year ago
For the problem other text being accepted you have to use a string as char can only hold 1 letter.
To fix this,
in your head, use:
(hash)include (lesser than sign)string (greater than sign)
then in your example just change the char to string and the single quotations to double quotations.
Darkplanner7 1 year ago
oh why are people braggining about their ages...big woop your learning how to write computer programs...big woop...seriously shouldent u be out partying and getting laid :P instead of wasting ur teen years doing this :S
lanick3 1 year ago
@lanick3 Wasting your teen years? If you had not realised this is a hobby and if you learn this now then you will be better when you grow up. Think, most basket ball players started basket ball when they were kids and now they are pros. Same thing with programming.
XAutomatedOwnerX 1 year ago
Comment removed
TheGOffice 1 year ago
please any one tell me if im the youngest studing c++
i just turned 14 and im a ameture pro at GML and now learing c++
so any one out there..are you 14 or younger?
lLxJLxJl 1 year ago
@lLxJLxJl
I know I guy who was about 12 when he was programming very visual and interactive c++ programs.
That shouldn't matter.
Lots of people your age use Game Maker.
Good luck though,
-Benjamin
Jorbz150 1 year ago
@lLxJLxJl im 13 :P
lukie254 1 year ago
@lLxJLxJl I'm 15 now, but I started with batch at 11, and java at 13.
officialbassbounce 1 year ago
@lLxJLxJl
i'm 14, and learning it pretty well ;)
FusionGTZ 1 year ago
@lLxJLxJl yup, 13 here, 2 days till 14 lol
evolutionofremix 1 year ago
@lLxJLxJl NAW IM 13 I WIN(RAR)
chickenpotato12345 1 year ago
@chickenpotato12345 LOL we're such nerds we use WIN(rar) lolz well nice to no..
lLxJLxJl 1 year ago
Does anybody know a good c++ program to use for c++?
shrci2 1 year ago
@shrci2 microsoft has visual studio c++ express if you are on windows
LATINO2434 1 year ago
@ValosTaonas The reason is because he's storing the user's answer as a 'char' variable, which can only be a single character or simple integer. There is a more technical explanation, but this should do. If you want to modify your program to accept a "Yes" answer, try using 'string' data type. NOTE: You will have to include the string header file in your program for this to run.
dcshoes841 1 year ago
What I mean is that for some reason, when I put 'yes' as an option, it doesn't work if the user types that as the answer. I bet he'll address that in those later tutorials.
ValosTaonas 1 year ago
I've been watching these videos and I've been wondering: "When's he going to show us how to use 'char'?" Yay! Now I || we know (hehe)!
@ElPeester No, it can handle more than one character response. It would seem obvious that if you wrote 'Yes' instead of 'y' it'll take that instead, but thats just me.
ValosTaonas 1 year ago
Why can it only handle one character responses? laaame.
ElPeester 1 year ago
Reading the from a website made me want to hang myself, Watching this makes me want to code! :D Thats good right? O.o
botenmaster 1 year ago
Thank you for your tutorial!
I just have a problem: I can't find the "|" on my keyboard (I am Swiss, probably it doesn't exist on this keyboard)!?
ThinkGoulash 1 year ago
@ThinkGoulash try over the tab key, that's where my | is
Darkerface 1 year ago
@ThinkGoulash - Its below the backspace, above the enter, left of delete, right of this thing " ] " . If u find it press shift, then press that button
iZenic 1 year ago
How comes that my Dev-Cpp tells me that ISO C++ forbids comparison between pointer and integer?
What the heck is going on?
hMIKESCHj 1 year ago
@hMIKESCHj , Most likely you are doing
if (answer == "Y" || answer == "y") // quotations marks are wrong
instead of
if (answer == 'Y' || answer == 'y') // single quotes are right
HopelessRomantic9000 1 year ago
lol i love the cookies and grilled cheese thing
win1mac2lin3 1 year ago
to loop it put
do{
[INSERT CODE HERE]
} while(answer != "end")
katt157 1 year ago
cookies OR grilled cheese?
quite different...
ERPP8 2 years ago
how come if I do this code my borland compiler says Lvalua required in function main ( )?
Mryouareretarded 2 years ago
how can you make it so it does a loop like the last tuatorial
TheJazzyTrombone 2 years ago
put the code(all of it) in:
while(1){
//code
}
103798 2 years ago
c++ is hard but all your tuts help so much o.o
cold0zerkpur 2 years ago
how come
do {} while (answer != 'n' || answer != 'N' || answer != 'y' || answer != 'Y');
does not work, but
do {} while (answer < 'n' || answer < 'N' || answer < 'y' || answer < 'Y');
does
i would of thought it would of made sense to use not equal too 'y' or 'n' - I am keeping the program in a loop by the way so if the user enters anything other than y or n it waits until the right input is entered
wicked tutorials btw, ive learned alot over the last 4 hours!
TheWhizzkiduk 2 years ago
loooool nice
Ma3FooS 2 years ago
my compiler just called me a perv when i tried this code, wtf!?!
tntbrett 2 years ago 28
haha, bean sousage!
wowlaxis 2 years ago
lol? whats with the random act of... jealousy?
y do u go make a negative vid towards some new star <_<
eternity899 2 years ago
lol hannah montana
bobbytmathew 2 years ago
Lmao You Fn Perv...I hope my mom dont see this. :d
GamerzBloodTV 2 years ago
you can also use the logical bitwise operator |.
eg
unsigned int result;
result = 10 | 15;
DO a search for bitwise operators
0121ryanh117 2 years ago
This has been flagged as spam show
miley.hot = false
miley.uglyAsFuck = true
roflmfao
cout << "hana monfaggot is a stinky old faggoty fat bitch who rapes lil boys cause she aka HE is a alien from the planet of fagtopia." << endl;
Bool hanaIsAFag = true;
while (hanaIsAFag == true){
cout << "hanah fucktana is a faggot and its true if you think otherwise ur a pedofile fuck from fagTown" <<endl;
}
lol 5/5 hana is a fag
crazynoob11 2 years ago 6
lol woops acidently made that go in html, sum glitch with google chrome or sumtin i did =O
crazynoob11 2 years ago
@crazynoob11
Very mature.
SiGhast 1 year ago
hannah is a little young for u bucky
howlovebegins 2 years ago
this is actually very similar to javascript lol
TeachYouCSS 2 years ago
That's what I first thought, but the "#include" is "import" in java... as well as how the main function is called...
CoDCopsProductions 2 years ago
XS she's only a kid XS you perv hahaha just playing ... keep making good vids.
arkilium 2 years ago
yes she is,
do
{
cout <<"hannah is sexy"
}
while (montana=hot);
lol
RED4MIX 2 years ago
OMG red your program so represents the real life situation with Hannah Montana.
while(montana=hot) will always be true because you keep assigning hot to her, = is the assignment operator and == is the equality operator. In the same way Montana will always be hot because people keep assigning hot to her, until someone inserts a "break;" statement into the endless loop Hannah Montana will always be Hot.
C0deZombie 2 years ago
she*
DhDo74 2 years ago
Comment removed
DhDo74 2 years ago 5
@DhDo74 he's 21... have you not seen the other vids
CrazyProgtapper2150 1 year ago
@CrazyProgtapper2150 Lol I have no idea why I wrote this 9 months ago, Ive known hes around that age!
DhDo74 1 year ago
@DhDo74 hes not 15 wtf.....
TheRealAuxiliary 1 year ago
@DhDo74 hes like 20 x_x
TheRealAuxiliary 1 year ago
@TheRealAuxiliary Lol it was a dumb joke
DhDo74 1 year ago
@DhDo74 22, but oh well.
mariomaruf 1 year ago
@DhDo74 he is 21
god4506 1 year ago
@god4506 UGHHHH!!! I KNOW!! I was just kidding 11 months ago, I don't even know why I said that!
DhDo74 1 year ago
@DhDo74 um he's like 21
TheGOffice 1 year ago
@TheGOffice SON OF A BITCH, I KNOW I WAS KIDDING.
DhDo74 1 year ago
@DhDo74 He said he was 22 in one and 23 in another. :)
icekat83 1 year ago
@DhDo74 um i think hes 21
mariomodguy 1 year ago
lol now i want cookies and a grilled cheese :)
swordman215 2 years ago 39
@swordman215 i want bean sausage =B!
TonyOrcy 1 year ago
@swordman215 you would use a string to input more than one letter and you would created an if else statement using the and operator which is &&
FallofDarkness55 1 year ago
hannah is hot but her mucis sucks
i love ac/dc iron maiden disturbed!!!
kfveadmin 2 years ago
she's ugly as hell
GNSstudios 2 years ago
do you think hannah montana is hot
i think she is......
kfveadmin 2 years ago
screw hannah, i go for finger eleven, muse, arch enemy, system of a down, and ACDC.
easytolearnmagicstuf 2 years ago
Seriously I wish I found your tutorials before I started my introduction to programming class. In three days I have my final exam and only now because of your tutorials am I actually beginning to understand these concepts.
JMarius2099 2 years ago 20
Five months and I vote for a new tutorial.
You're the person who explains it best so far. But maybe I can make it on my own with what you've taught me. Thank you for the 20 tutorials you made and put your dedication into laments terms so everyone can understand.
tonyeddie 2 years ago 3
funny guy, who needs a therapist when c++ will tell you if you are fine or not, jason please don't tell them my results...
techfixer16888 2 years ago
super :)
VanilFox 3 years ago
Im making an a math program and i want to know whats wrong with this!
if (inde == 'add' || inde == 'Add' || inde == 'aDd' || inde == 'ADd' || idne == 'ADD' || inde == 'aDD')
inde is a char varible for the answer to the question on the front page.
Snazzydog333 3 years ago
Use string, not char.
MrReckoning 2 years ago
Use string add;
MrReckoning 2 years ago
bucky is one square fella but im sure these are helpful to beginners ha. make some intermediate tuts next please
sportsnumber8 3 years ago
I like these, but prefer regular C (ansi C) Could you do an entire series on this in the future. Would really appreciate!!!!!!!!!!
ChangAwnthuwey 3 years ago
that's basically C. C++ is C with classes and other new stuff
EarthBoundGame 3 years ago 2
Thanks man! This really helped me. Nice tutorial.
smcorrea 3 years ago