Hello,

I was wondering if you could change the program icon (it's usually a picture of c:\), and without making a gui progra, just a normal one if you get me?

Like you can change the title by; system("title This Is Your Title");

Help a.s.a.p please :).

~ Black Magic

Ok.

Off Topic : Does any one have Msn-Messenger or another IM, so i can ask help through that please :)

That would fail the purpose of this community. When you ask questions here and people give answers it helps other's who might be facing similar problems. Just like you can find a lot of answers by going through previous threads.

Yeah, sorry about that.
I'm learning classes atm and my little brother is telling me what to do, kind of fun :).

#include <iostream>

using namespace std;

    class Cat
    {
          public:
                  
          unsigned int Age;
          unsigned int Weight;
          unsigned int Siblings;
          unsigned int Smoke;
          unsigned int TV;
          
          void Meow();
    };
    
int main()
{
    system("title Class Cat.");
    
    Cat Elliot;
    
    Elliot.Age      = 81;
    Elliot.Weight   = 132;
    Elliot.Siblings = 20;
    Elliot.Smoke    = 0; // 0 = False, 1+ = True.
    Elliot.TV       = 1; // 0 = False, 1+ = True.
    
    cout << "Elliot is a cat who is " << Elliot.Age << " years old.\n" << endl;
    cout << "Elliot weighs " << Elliot.Weight << "kg!\n" << endl;
    cout << "Elliot has " << Elliot.Siblings << " siblings!\n" << endl;
    
    if (Elliot.Smoke == 0)
       cout << "Elliot Does Not Smoke!\n" << endl;
    else
        cout << "Elliot Smokes!\n" << endl;
        
        if (Elliot.TV == 0)
       cout << "Elliot does not watch TV!\n" << endl;
    else
        cout << "Elliot watches TV!\n" << endl;
    
    system("PAUSE>nul");
}

c++ has bool data type, so use it instead of that unsigned int

class Cat
    {
          public:
                  
          unsigned int Age;
          unsigned int Weight;
          unsigned int Siblings;
          bool Smoke;
          bool TV;
          
          void Meow();
    };

<snip>
    Elliot.Smoke    = false;
    Elliot.TV       = true;

Thanks, i'm just really mucking around atm but im going to make somethings like Elliot.setAge(81); in a minute or two :)

Btw, can you tell me another alternative to system("PAUSE>nul");

Because pause nul gets rid of press any key to continue,

What other solutions can i use?

EDIT: Is this the right way to start a simple poker game?

class Cards
{
      public:
                  
      unsigned int Ace;
      unsigned int Two;
      unsigned int Three;
      unsigned int Four;
      unsigned int Five;
      unsigned int Six;
      unsigned int Seven;
      unsigned int Eight;
      unsigned int Nine;
      unsigned int Ten;
      unsigned int Jack;
      unsigned int Queen;
      unsigned int King;
    };

Thanks, i'm just really mucking around atm but im going to make somethings like Elliot.setAge(81); in a minute or two :)

Btw, can you tell me another alternative to system("PAUSE>nul");

Because pause nul gets rid of press any key to continue,

What other solutions can i use?

EDIT: Is this the right way to start a simple poker game?

class Cards
{
      public:
                  
      unsigned int Ace;
      unsigned int Two;
      unsigned int Three;
      unsigned int Four;
      unsigned int Five;
      unsigned int Six;
      unsigned int Seven;
      unsigned int Eight;
      unsigned int Nine;
      unsigned int Ten;
      unsigned int Jack;
      unsigned int Queen;
      unsigned int King;
    };

As for the system("PAUSE>nul") question, here is a link on how to keep the execution window open so it doesn't disappear on you, if that is your reason for using system("PAUSE>nul") . There are other threads here at daniweb too. This one's from a similar site.

http://www.dreamincode.net/forums/showtopic30581.htm

These threads contain some reasons on why not to use system("PAUSE") as well as some alternatives.

As for your other question, I don't think that's a good way to start a Cards class for a poker game. Ace, King, Eight, etc., seem more to me like constants than variables. Eight should have a value of 8. It shouldn't change, so don't make it a variable. You could make those constants if you like and define them in your class. I guess I'd approach a Card class like this:

class Card
{
     private:
          int cardValue; // will be 1 through 13
          char cardSuit; // 'S', 'H', 'C', 'D'

     // more code
};
This article has been dead for over six months. Start a new discussion instead.