{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hangman - size=width cout<<"Please enter a number...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//The Game of Hangman #include <iostream> #include <string> #include <srand> #include <cstdlib> include <fstream> using namespace std; class Hangman { private int size; //size of text art char gender; //gender of player string guessword; //words guessed by the player string player; //name of player void set_gender(char) const; void set_size(int) const; public void draw_gallow (int); void draw_head(char, int); void draw_body(char, int); void draw_legs(char, int); void guessword (); string word; }; void Hangman::set_size(int width) const {
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: size=width; cout<<"Please enter a number to describe the size of object:"; cin>>width; } void Hangman::set_gender(char gender) const { cout<<"What is your gender?"<<endl; <<"Please enter "male" or "female."<<endl; cin>>gender; } void Hangman::draw_gallow (int size){ } void Hangman::draw_head (char gender, int size){ } void Hangman::draw_body (char gender, int size){ } void Hangman::draw_legs (char gender, int size){ } void Hangman::guessword (string hangman,dat) } int main(){ }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online