WormSine 0 Newbie Poster

YES, another person looking for help with 'Hangman Project'

  1. I am not wanting or looking for ANYONE to "DO" my homework for me. those people irritate me I’m a big boy and I know my way around the net and not afraid to forum search. "So please leave those comments to yourself." -Thanks-

With that being said: Hear we go.

Ok Due to some paperwork snafu’s in the college office, I am currently in an Intermediate Programming course, when I should be in programming basics course.

Needless to say it’s only the 2nd week of class and the project is not due for 7 weeks... So I have time on my side. too play catch up

I am using Visual Studio 2008 C++ Win32 Console for the 'Hangman Project'

I just started learning about working with Single Classes and Multiple Class Inheritances.
I somewhat understand the class, classes or at least the concept anyway. I am having trouble with the menu and menu options and making them work correctly with a class. Since I have the extra time to learn as much as my spongy brain can within the next 7 weeks, I Wanted to make a title menu with 3 options (example below)

#include <iostream>
#include <windows.h> // Needed for 'system' (functions)


using namespace std;

 char DoMenu();

int main()
{
    char choice;
    do
    {
        choice = DoMenu();

        switch (choice)
        {
        case 'e': 
        case 'E':  break;
        case 'p':  break;
        case 'P':  break;
        }
//*************************************************************
    } while ((choice != 'E') && (choice != 'e')); //used code example from MSDN help files.
//*************************************************************
    return 0;
}
 //Starting point of menu selection
char DoMenu()
{
char MenuChoice;


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////    

  system ( "cls" );                                      
    system( "color 0A" );                                


    cout << "     #     #                                              n";      
    cout << "     #     #   ##   #    #  ####  #    #   ##   #    #    n";         
                cout << "     #     #  #  #  ##   # #    # ##  ##  #  #  ##   #    n";         
    cout << "     ####### #    # # #  # #      # ## # #    # # #  #    n";         
    cout << "     #     # ###### #  # # #  ### #    # ###### #  # #    n";         
    cout << "     #     # #    # #   ## #    # #    # #    # #   ##    n";         
    cout << "     #     # #    # #    #  ####  #    # #    # #    #    nnnnnnn";      
                cout << "                       *** Please make your selection ***nn";               
    cout << "                          followed by the [Enter] key.nnnn";
    cout << "                          (P)lay "; cout << "   (M)enu ";cout << "   (E)xit nn";
    cout << "                                    Choice... ";
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
cin >> MenuChoice;

return MenuChoice;
}  // End     

did't post it right, oh well you get the idea.
Yes, I know I havn't added my #include "Menu.h" to the Menu yet.

Since I have never even learned about anything on menus, I am just wondering.

QUESTION: I probly should move the case 'e': and some of it, if not all to the class menu and refrence it to here, or would I be wrong in thinking that?

I have seen the Tut's on hangman games, but its not my style. I like to do it on my own. I really could use some advice, maybe to see if I am going the right way or the concept is sound or maybe I am just not seeing it or whatever the reason. I could use some help with some links and maybe some Example code of what I am trying to do.. does NOT need to work, just showing the concept behind it I pick up on things fairly well, but for some reason I am just having Coders block and not really sure in which process or steps I need to do to correct this.

Pretty much goes as follows:
Press (P)lay Game

Press (M)enu to goto the 'Actual Menu' witch allows the user to add words, change difficultly or the word from 4 letter words, 5 letter words etc,;

and of course th (E)xit

Since I am cramming all I can into this, just because I can't afford to drop out and wait a quarter and I am in it for the long haul reguardless.. so I am going to try and tough this quarter out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.