HangMan

Started by
30 comments, last by Ravuya 17 years, 10 months ago
what?
Advertisement
I could believe he's a sub; we had a sub for the last few weeks of high school chemistry (right before the final exam) that came in from English. We ended up teaching it to her, which was sub-optimal. Subs aren't prepared for their gigs very well in public school.
Quote:Original post by Fluffy21
yea but the regular teach had them do worksheets y??


Because your grammar is atrocious, but I digress.

As far as making you HangMan game, before you can figure out what code you need, you should think about the basic logic of the game HangMan.

Will you randomly pick the word from a list or have a user input it first?
How will you represent the person being hung if the user guesses wrong (ASCII art would probably be easiest)?
How will you handle user input to begin with?
Et cetera.
so it would start out with something like this
#include<iostream.h>
//-----------------------
void word(int &Wor)
{
cout<<"Enter a Word to be guessed"<<endl;
cin>>Wor;
system('cls')
}
//--------------------------------
void guess(int&Let)
{
cout<<"Guess a Letter"<<endl;
cin>>Let;
//-------------------------------------------
int main()
{
int Wor=0;
int Let=0;

Word(Wor);
Guess(Let);
return(0);
}
from their what do i do
Quote:Original post by Fluffy21
from their what do i do


Compile it, run it, and debug it.

o and o error and warnings now what ?
'int' is a datatype that is intended to only store numbers. You'll need to use an STL string or a char array if you want to store a word.

Also, C++ is case sensitive -- if you define a function's name as all lowercase, the call to that function must also be all lowercase. You are calling the guess function with Guess, and the compiler has no idea what Guess is.
There really needs to be an easily available post on GameDev about how to post to get the answers you're seeking.

I know there's the tips section in the FAQ, but that needs a little bit of work. (And maybe there is a post elsewhere; I just didn't find it in my 10 seconds of looking).

Fluffy21, just a few tips...

Spelling & Grammar help. It doesn't need to be flawless, and abbreviations are fine, but using different forms of words such as know and no inappropriately is extremely noticeable and more likely going to get more insults than help.

Spend a little time researching. Search the site first, or use your favourite search engine such as Google and search the internet. No one likes answering questions which a little research would have answered. It displays laziness, and only means the poster is going to come back again and again without learning.

While people are here to help you, help is the keyword. We're not here to do your work for you. Its one thing to ask what does a sort do, I don't understand it. It's another thing to ask someone to implement it for you.

Keep things to the point (which includes source code)Most of us use this site casually, and don't have hours upon hours to look things up, as we have lives of our own. Anything that requires more than a minute of research of my own, I'm mostly going to avoid. This involves answering questions, as anything that required more than a minute, I probably don't know well enough, or if it takes me a minute to understand your code, I don't have time to delve into that much depth.
Quote:Original post by Fluffy21
anything but this lol


I sincerely hope you don't teach English either.
nvm ill just tell them to play games thanks anyway guys

This topic is closed to new replies.

Advertisement