I took what you taught in this video and used the random function to also create a random amount for the highest value that the number can be like this
int rndrndnum
int num rndrndnum = rand()%20+1 num = rand()%rndrndnum; num = num;
@TahirAljazeera If Anybody Here Knows C++ or any other programing languages And Wants to be in a programing group inbox me on here.I Know C++ And want to start a group.its completly free.its a internet group.i got a website yall can join. Inbox me if you wanna join.plz join.My Website is A Social Site.Inbox me for details.No disrespect intended in posting this on there vids:)
cin.clear(); C:\Users\me\learning\guessbumballs.cpp In function `int main()':
13 C:\Users\me\learning\guessbumballs.cpp `cin' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)
pleae help I did everything like you did unless I'm missing something
@lzrd0113 Well, I got it to work now, but after continuing to the rest of your tutorials and I just decided to include the windows.h library and then srand worked... I don't know why, but including that works for me. I removed it, and, again, the same error message.
@Xkiller6000X the color of #include depends on what C++ compiler your using and the reason why you have #include is #include is a preprocessor directive which means before the compiler executes any code you wrote the #include statement tells it to include which library your using for example
OMG!!!! I am using Dev-C++ and it wont compile the code. I'm using vista, is that the problem? And its also saying I have errors in lines of the code that I KNOW is right. Please help
is it blank? when you go execute cmopile? can you no tsee anything? then you have to go program reset. And if it still shows errors when you know that their not just run the exe. Hope this helped and subscribe to me.
@ICauseMouthCancer check for capitalization errors or errors before the statement highlighted. If there are still no errors make sure you have your {} brackets and everything else the same. I get that problem alot and don't find out the problem until i look at it for so long.
I don't do the same thing, He uses old techniques, you'll see in my videos, in other tutorials that will be posted, i will show good practice, what you watch here is bad practice. He doesn't use arrays, he doesn't code well so all his source code is messy, it's all bad!.
Subscribe to my channel, i am posting new generation c++ programming. + Good pratice.
Dude great tutorial. but may i suggest you put the code of the program into the description so that we can just coppy and paste your code and pay attention to what you have to say and not just spend the entire time trying to write down what you've got. other then that it's a great tutorial.
hey man ur a good tutor at this! keep it up man ur great! im a beginner and at first was using ur videos and then taking the codes apart to find out what everything does and than i started making my own programs but i came back to your video today and it was great! if u wanna talk bout programming or coding or stuff like that thatd be cool. im not very good but im learning!
Um... Yea, I don't know who voted negatively to Sherpaswami's comment but I agree, you're going a little too fast. Also video tutorial 2 has been removed. But nonetheless great video and really helpful albeit a little fast =).
This comment has received too many negative votesshow
ok if you're gonna put "tutorials" on here you should at least do them in a way that others can learn from! 1. you're going WAAAAAAAYYYYYYY too fast! slow down, or put them into two different videos if you have too. I appreciate that you want to help others learn how to use c++. Also, most people posting are saying they're having problems with getting past the compile part.
I have a question; underneath system("CLS"), where there is a cin command: "cin.clear", it is a curly bracket, but is it a regular bracket next to that? Watch from 1:57.
please help me I'am confused it's keep telling me on part where I tiped, just like this system("CLS"); and yes i have DeV-C++. Please help me and P.S. i love your videos they realy helped me...
Dont criticise someone who is doing something to help people, for FREE. Somewhat better than you probly do, He tried keeping it basic for ppl like me who have no clue how to code in c++ but would like too.
LOL at1:46 he says "oh jesus"
quagpwn 1 month ago
does this use time to pick a random number?
knowledgeismyrock 1 month ago
Comment removed
Nicefailbro 1 month ago
expected `(' at end of input -- wtf is this error all about.. its anoying
h1ghpower 1 month ago
LoL, don't typ for example .500 as a guess ^^
toonypy 1 month ago
a small doubt how come you did not add <<end1<<after cout<<"enter your guess:";
wayne39067 2 months ago
6 09 how does you write //
kotsios1998 2 months ago in playlist More videos from reconnetworks
This has been flagged as spam show
HUMAN BRAIN ONLY IS TRANSMITER !
VISIT MY SITE FOR BRAIN AND SOUL !
C++
elohism 2 months ago
This has been flagged as spam show
Hey guys, check out my page if you need some more help. Covering each C++ component week by week, drop a comment if you need help.
ComputerTechBoss 2 months ago
Can any one say me what C++ is he using??
MrGruja996 4 months ago in playlist Још видео снимака корисника reconnetworks
I took what you taught in this video and used the random function to also create a random amount for the highest value that the number can be like this
int rndrndnum
int num rndrndnum = rand()%20+1 num = rand()%rndrndnum; num = num;
chochang262 4 months ago
imba
princechad23 4 months ago
LOVE YOU THANKS =DDDD
afker553 4 months ago in playlist More videos from reconnetworks
Comment removed
afker553 4 months ago in playlist More videos from reconnetworks
I'm wondering what kind of party's you go to where you guess how many gumballs there are in the jar.......Great tutorial non the less!
kurbiekirk 6 months ago
no matter what value i enter i get Too low
iObjects = rand() % 1000 + 1;
if(iGuess > iObjects) cout << "Too High" << endl << endl; if(iGuess < iObjects) cout << "Too Low" << endl << endl;
XTREME104X 7 months ago
count << "Awesome, ty ;)" << endl;
Ciprik94 7 months ago
This has been flagged as spam show
have any1 tried going to the website he mentioned at the beginning of the tutorial? If yes could you please post the link? thanks...:)
TahirAljazeera 8 months ago
have any1 tried going to the website he mentioned at the beginning of the tutorial? If yes could you please post the link? thanks...:)
TahirAljazeera 8 months ago
@TahirAljazeera If Anybody Here Knows C++ or any other programing languages And Wants to be in a programing group inbox me on here.I Know C++ And want to start a group.its completly free.its a internet group.i got a website yall can join. Inbox me if you wanna join.plz join.My Website is A Social Site.Inbox me for details.No disrespect intended in posting this on there vids:)
JakubT100 5 months ago
It's
"Too cool"~~~~~~~~~~
as29023050 9 months ago
who the fuck goes to a party to guess gumballs in a jar?
sasquatch989 10 months ago
wouldn't it be easier if you use:
while(iUserguess != iGumballs)
recruiter88 10 months ago
This has been flagged as spam show
objectprogramming-bilal.blogspot.com for programs
bilaldarkknight 10 months ago
LOLOLOLO
my sister crashed it by entering
81442684474271456gi
XD
btw i had it set from 1 to 50
IT JSUT KEPT SAYING HER GUESS WAS TOO HIGH LIKE HTE MATRIX!
nice tut man! epic lulz!
iopabc123789 11 months ago
Can#t you use Else if or something instead of putting two if statements?
superant10000 1 year ago
If yo're having computer problems I feel bad for you son, I got 99 problems but the comp aint one.
superant10000 1 year ago
for your do while loop in the argument of the while you could have used: iUserguess != iGumballs, and that would save some time.
FallofDarkness55 1 year ago
@FallofDarkness55 I agree with you. That was what I was goina say before I read your comment.
bacharyou1 1 year ago
lol all try to put text instead of numbers and see what happens xD
Pacciatto 1 year ago
Hello, do I need to include main(void)? can I just do main() ? Thanks in advance. I am a new learner
mathlover111 1 year ago
@mathlover111 no u dont need to include main(void) cause its exactly the same as main()
it means exactly the same
littlesoldiergraba 1 year ago
thanks dude, ur the fucking boss!!!
ramonet27101993 1 year ago
Hey! that was soo cool! My machine just gave me a high five! thanx i never knew it could do that!..... lol
MrRogueEntertainment 1 year ago
figured it out
brokenhorseshoe 1 year ago
I'm having a problem with
cin.clear(); C:\Users\me\learning\guessbumballs.cpp In function `int main()':
13 C:\Users\me\learning\guessbumballs.cpp `cin' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)
pleae help I did everything like you did unless I'm missing something
brokenhorseshoe 1 year ago
@brokenhorseshoe resolve the namespace you need using the scope resolution operator. eg
std::cin
std::cout
cplusplusish 1 year ago
how u put in this .... Symboll just after rand
ukflyswatter 1 year ago
Mine just keeps spamming too high?? any ideas
CMD1994VBS 1 year ago
@CMD1994VBS something wrong inside ur loop
littlesoldiergraba 1 year ago
wow you could make a very complex 20 questions game that guesses what you are thinking about
SevenfoldSam 1 year ago
lololololololol i typed no instead of a number and kept scrolling with too high down the whole thing.
BobDawg173 1 year ago
yea im a programmer and i wish i watched this when i was in school
dagnaste01 1 year ago
this looks kinda hard
Jonathanemokid 1 year ago
that's interesting.
AK8769 1 year ago
of everything in my code their is something wrong with my return 0;... duh hell???
jacksonjboy17 1 year ago
@jacksonjboy17
check the line before return 0 check if there is a Semi Colon to declare an end of statement.
razor1998 1 year ago
Good tutorial, it worked, thnxs !
virtualadam33 1 year ago
straight out canadian.
fxcat123 1 year ago
hi, i use Visual Studio 2008 Express Edition.
but everytime I try to use ´time´ it comes with this error:" error C3861: 'time': identifier not found."
please help me.
MakiFreak12 1 year ago
@MakiFreak12
...i use dev C++ hell of alot easier
razor1998 1 year ago
error: 'srand' was not declared in this scope.... Do you HAVE to be using Dev C++?
lzrd0113 1 year ago
@lzrd0113 Well, I got it to work now, but after continuing to the rest of your tutorials and I just decided to include the windows.h library and then srand worked... I don't know why, but including that works for me. I removed it, and, again, the same error message.
lzrd0113 1 year ago
iGumballs = rand()%1000+1;
the symbol is the percentage symbol, copy and paste (it will look differently when its in the compiler)
BLESSMAN11 1 year ago
@13379009 agreed.
On another note, I don't really understand what the static cast unsigned thing does. Anyone care to explain?
m00nslide 1 year ago
neat!
lightspreader 1 year ago
Nice canadian accent ^^ spotted it a mile away
PunkAssKriss 1 year ago
Really good program, thank you so much!
dannika1983 1 year ago
type in a word lol
wolfwingx1 1 year ago
how come my text dont turn blue like on his screen?
donzangetsu 1 year ago
ben is that you? O_O
Bolduccjperson1 1 year ago
why doesnt any of your shit ever work for me?
xlarkascendingx 1 year ago
it would be easier to write
while(iUserguess != iGumballs);
13379009 1 year ago
lol i guessed mine in 1 try
Marc4440 1 year ago
@Marc4440 Virtual high five! XD
wolfwingx1 1 year ago
dude how do u hv #include blue????
and why?
Xkiller6000X 1 year ago
@Xkiller6000X the color of #include depends on what C++ compiler your using and the reason why you have #include is #include is a preprocessor directive which means before the compiler executes any code you wrote the #include statement tells it to include which library your using for example
126644 1 year ago
Nice program!
clanerin 1 year ago
I have followed EXACTLY what he has done, and I have checked OVER AND OVER again to make sure I did it right yet I come up with these errors:
error C2059:syntax error :{
error 2143 syntax error missing ; before {
error C2059 syntax error :)
fatal error C1075 end of file found before the left brace { (program source) was matched
I am using the same C++ hes using, with win XP, and with a clone of what he wrote down, some one tell me what happend.
P.S. the syntax errors happen at while command
undead890 2 years ago
@undead890 Best C++ error ever.
syntax error :)
LMAO
0121ryanh117 1 year ago
OMG!!!! I am using Dev-C++ and it wont compile the code. I'm using vista, is that the problem? And its also saying I have errors in lines of the code that I KNOW is right. Please help
ICauseMouthCancer 2 years ago
is it blank? when you go execute cmopile? can you no tsee anything? then you have to go program reset. And if it still shows errors when you know that their not just run the exe. Hope this helped and subscribe to me.
yo3443 2 years ago
@ICauseMouthCancer check for capitalization errors or errors before the statement highlighted. If there are still no errors make sure you have your {} brackets and everything else the same. I get that problem alot and don't find out the problem until i look at it for so long.
BobDawg173 1 year ago
is it me or is it blurry? i will go blind staring at this.
x11115 2 years ago
Howcome when I go to debug in Visual Studio, it's grayed out and I can't click on it?
Bikerxgames540 2 years ago
have you created a new project yet? that might be a problem...
sammykafle 2 years ago
Worked like a charm.
Thank you once again for the sweet tutorial!
mattiexpx 2 years ago
Yeej, 50! haha
xatic1 2 years ago
When i finished it it says no such of file or ditectory..
Urketadic 2 years ago
Haha, this is fantastic.
Simple, but so great to learn on!
Thanks!!!
imalwayswatchingu00 2 years ago
Wow this is great!!... nice program. I'm amazed at how this works
DreHectik 2 years ago 12
@DreHectik u right
dagnaste01 1 year ago
lol now ive made this game in batch, python and C++ now :D
moffboffjoe 2 years ago
Nice One!! I made it my number was 969 ;D
vitez46 2 years ago
i still cant compile it...
AllroundTuts 2 years ago
whats the sign you put in the line:
igumballs = rand( )
Its really unclear and I cant recognize it at all.
Thanks
Friedtunafish77 2 years ago
@Friedtunafish77 it is a % symbol or PERCENT it looks different in the program, hope i helped.
Brandob971 2 years ago
Yes, you helped me a lot. Thanks. Your kindness overwhelmed me.
Friedtunafish77 2 years ago
At least compared to others being "reasonable"
Brandob971 2 years ago
I'm trying to use Visual C++ and i'm getting an error:
Did you forget to add '#include "stdafx.h"' to your source?
I can't write the code without the "stdafx.h"!
Then I tried to compile with the pre compile and the file is with 10kb, just I can execute the file!!
What can I do?
ERosostolato 2 years ago
make sure when you start the project to check the "empty project "check box
0121ryanh117 2 years ago
select Win32 Console Application under New - Project
Danotto9797 2 years ago
@ERosostolato Ive been getting that too...
malchiah9090 2 years ago
what text editor are you using?
johnnyc130 2 years ago
if u want better quality for the vid go to the adress bar and add "&fmt=18"
no quotes.
MasterHacker01 2 years ago
thnx =D
cafeta86 2 years ago 10
This has been flagged as spam show
I don't do the same thing, He uses old techniques, you'll see in my videos, in other tutorials that will be posted, i will show good practice, what you watch here is bad practice. He doesn't use arrays, he doesn't code well so all his source code is messy, it's all bad!.
Subscribe to my channel, i am posting new generation c++ programming. + Good pratice.
cprogrammerc 2 years ago
This comment has received too many negative votes show
get a life~!!!!
Captnuendo 2 years ago
This comment has received too many negative votes show
he uses old programming techniques.
Subscribe to my channel, i post new generation c++ programming tutorials.
What he is showing is bad pratice.
New videos will be available every 2-5 days on my channel too!
cprogrammerc 2 years ago
You do the exact same thing. Stop complaining at others work. I mean. "look at my channel" is enough.
StefConEnterprises 2 years ago 2
didnt work for me
kalebbird 2 years ago
what do you mean module or whatever you call it at 3:14 where it says: iGumballs = rand()
i dont get what to put after the ()
allmasteraa 2 years ago
I think its the percentage sign
capoeiragerais18 2 years ago
iGumballs = rand()%1000+1;
And that's to put a random number, between 1000 and 1, as the iGumballs value..
Guillee92 2 years ago
the freaking website wont work
soccergod561234 2 years ago
how do i get that imudguless?
soccergod561234 2 years ago
for efficiency, shouldn't you use "else if" rather than "if" for the "if(iUserguess < iGumballs)" element? my apologies if I'm wrong.
captainsurrey 2 years ago
It doesn't matter, you'd only be writing more code ;)
crazymanny00 2 years ago
What program do you use
I am using Dev and all of the colors i want you have. For code identification.
MrPsycho3D 2 years ago
MrPsycho3D - looks to me as if he's using Visual C++ Express.
odavenport 2 years ago
lol.cpp:5: error: expected `;' before "int"
lol.cpp: In function `int main()':
lol.cpp:9: error: expected initializer before "int"
lol.cpp:15: error: `iGuesses' was not declared in this scope
lol.cpp:21: error: `iUserguess' was not declared in this scope
lol.cpp:31: error: expected primary-expression before ')' token
lol.cpp:31: error: expected `;' before ')' token
lol.cpp:36: error: expected `}' at end of input
Tankstar0 2 years ago
I thought Int main(void) caused memory corruption?
Secret1337 2 years ago
This has been flagged as spam show
ZZZZZZZZZZZZzzzzzzzzzzzzzzzzzz too slow
koforeverk2 2 years ago
did youtube make some code on their pages so cursor disappear if u do not move mouse for some period of time or is it some bug on my browser?
Temerinoje 2 years ago
ok thanks...
mallas1009 2 years ago
where can i download C++?
what site?
mallas1009 2 years ago
omg... c++ is a programming language. If you need a c++ complier: GOOGLE GOOGLE GOOGLE GOOGLE GOOGLE GOOGLE GOOGLE
willtheforsaken 2 years ago
just to get some ideas for compilers to download
dev c++
code::blocks
visual c++ express
borland c++ builder ( not recommended though)
poppedcorn123698745 2 years ago
Do you really need cin.clear()?
MoreCheesePleez 2 years ago
Comment removed
memypcandcplusplus 2 years ago
what is the symbol you are using for "OR" on your while lines
tjloff 2 years ago
Dude great tutorial. but may i suggest you put the code of the program into the description so that we can just coppy and paste your code and pay attention to what you have to say and not just spend the entire time trying to write down what you've got. other then that it's a great tutorial.
nfistfu 2 years ago
Comment removed
memypcandcplusplus 2 years ago
hey man ur a good tutor at this! keep it up man ur great! im a beginner and at first was using ur videos and then taking the codes apart to find out what everything does and than i started making my own programs but i came back to your video today and it was great! if u wanna talk bout programming or coding or stuff like that thatd be cool. im not very good but im learning!
hippyyypower69 2 years ago
Great tutorial! Thanks so much
Grishnahk4 2 years ago
Comment removed
Hamhead94 2 years ago
Comment removed
hette666 2 years ago
Comment removed
hette666 2 years ago
if(iUserguess > 1Gumballs) youre problem is at 1Gunballs, is iGunballs not 1gunbals and you have to leave 1 space so i should be like this
if(iUserguess > iGunballs)
rfdangel001 2 years ago
this is an error i get:
if(iUserguess > 1Gumballs)
that not invalid...
how i must do it...???
hette666 2 years ago
thank you so much, i found it's a so interesting thing!!
hanbeibei717 2 years ago
Instead of what you put in the while for the do statement, i put this:
while(iuserguess != igumballs)
and it still works
freetrader0000 2 years ago
Um... Yea, I don't know who voted negatively to Sherpaswami's comment but I agree, you're going a little too fast. Also video tutorial 2 has been removed. But nonetheless great video and really helpful albeit a little fast =).
XedHaggarddeX 2 years ago
This comment has received too many negative votes show
ok if you're gonna put "tutorials" on here you should at least do them in a way that others can learn from! 1. you're going WAAAAAAAYYYYYYY too fast! slow down, or put them into two different videos if you have too. I appreciate that you want to help others learn how to use c++. Also, most people posting are saying they're having problems with getting past the compile part.
sherpaswami 2 years ago
u know u can pause it....to catch up...?
BSUOSUlover 2 years ago
it says i have an error on iGuesses = 0;
using DEV C++
any ideas on whats wrong?
Stickangels 2 years ago
I'm using the same software, it works for me. Make sure you typed everything correctly and that there is a semi-colon on the line above
pikpolly 2 years ago
what is the or sign he uses. does it matter if you put or or do you have to do it his way
pattymitch4 2 years ago
it is the percent sign; %
pikpolly 2 years ago
wat is a modulus sign.... ??
KillieMonkees 3 years ago
Percent sign (%)
mjin12 2 years ago
this doesnt work for dev-c++ it had loads of errors and one about the
"#isostream thingy
wasitrealy 3 years ago
I had the same mistake.
It's not isostream, its iostream, you put an s in between the i and the o.
eginteractive 2 years ago
oooooooh!!! yh! it works now!
wasitrealy 2 years ago
I got it to work it helps if you turn it to High Def then you can see everything. Good Luck!
Badbrad234 2 years ago
I have a question; underneath system("CLS"), where there is a cin command: "cin.clear", it is a curly bracket, but is it a regular bracket next to that? Watch from 1:57.
vincitmori 3 years ago
No just parentheses cin.clear()
kiasta 3 years ago
what means error before token..............????
please help me I'am confused it's keep telling me on part where I tiped, just like this system("CLS"); and yes i have DeV-C++. Please help me and P.S. i love your videos they realy helped me...
racbbb 3 years ago
int main(void) is not necessary in C++...
systat 3 years ago 2
yes it is, you must have a main function in your program.
graacie 3 years ago
You are out of league dude, I am talking about void argument passed to the main function, it is not necessary in C++.
systat 3 years ago
true, also you could call it void main()
and leave out the return statement because you don't need to return a value:)
ow, and you can put the integers decalarations short by just using
int iA,iA,iC;
in stead of seperate lines:)
bobkin2 3 years ago
Yeah I don't know why he uses void *shrugs*
kiasta 3 years ago
Now make a program that automatically finds the random number lol :P
I think that would actually look something like this
{
int answer = 1;
do { answer++ }
while(answer != iGumballs);
if(answer == iGumballs) cout << "The Answer Is " << answer;
}
of course you would have to place that code in the game somewhere where it is not going to cause an error... :D
CharlestonChew03 3 years ago
Dont criticise someone who is doing something to help people, for FREE. Somewhat better than you probly do, He tried keeping it basic for ppl like me who have no clue how to code in c++ but would like too.
Razor0Toxic 3 years ago 2
I didnt criticize anyone you idiot.
CharlestonChew03 3 years ago
i got a problem though, when i start the game everything is fine but when i enter i guess ihave to enter it twice for it to "register"
commanderpopinfresh 3 years ago
all of your tutorials are magnificant
commanderpopinfresh 3 years ago
Nice tutorials!
Neppy101 3 years ago
whats Modgules
resatti 3 years ago
its called modulus (%)
It take the rest of a division
5/2 = 2 rest 1 so
5%2 = 1
allasktulu 3 years ago
it says that mine is to buggy...but i did exactly what you did.
one of them is when i put "con.clear();"
could you or anyone else help thanks
y35n00b5 3 years ago
cin.clear
karlhraum 3 years ago
sorry i confused you...thanks for helping, i meant to say that i put
cin.clear();
y35n00b5 3 years ago
Help!, something is wrong... It says: No such file or directory. help me...
Thanks
TheGhostMan23 3 years ago
oh i just found out it was lol Visual C++ you dont have to buy it you could just change the date back and it will work =D
McClover 3 years ago
Looking for c++ friends
artisticnight 3 years ago
What program are you using now, i thought it was Dev-C++?
McClover 3 years ago
Man that read like one pass assembler. Give us a CLASS
lafinboylafbubba 3 years ago
C++ Beginner Programming Tutorial, teaches you how to create a guessing game, click on my username to see the video!
InfernoDevelopment0 3 years ago
while building
the problem is:
1>c:\users\parents\main\main\main.cpp(6) : error C2447: '{' : missing function header (old-style formal list?)
HuskyRonan 3 years ago
did you type in int main (void)?
Dodec84 3 years ago
yes but...(void) is a...function unable or something
HuskyRonan 3 years ago
to clear some things up void is now obselete and is bad practive to write it so please disregard
this int main(void)
do this int main()
deryni21 3 years ago
What is he writingat 7:05 - 7:10?
hyZa1 3 years ago
"iGumballs" undeclared identifier
help
smcorrea 3 years ago
write at the start of the program int iGumballs and it will work ...
Abraxas20012 3 years ago
how the f*** do you know when to put ";" ?!?!?
jasonguyperson 3 years ago
you put a semi colon at the end of every statement.
warrzor 3 years ago 3
lmao not that hard n00b
Deefawlt 3 years ago
how old are you? like 12?
jasonguyperson 3 years ago
how the fuck does he sound 12???
McClover 3 years ago