Program Icon.

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2008
Posts: 177
Reputation: Black Magic is an unknown quantity at this point 
Solved Threads: 4
Black Magic's Avatar
Black Magic Black Magic is offline Offline
Junior Poster

Program Icon.

 
0
  #1
Apr 10th, 2008
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
C Plus Plus Coder.
Fourteen Years Of Age
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,585
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1487
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Program Icon.

 
0
  #2
Apr 10th, 2008
Use an icon editor to create the icon then windows explorer to change the program's icon.

Or these links
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 177
Reputation: Black Magic is an unknown quantity at this point 
Solved Threads: 4
Black Magic's Avatar
Black Magic Black Magic is offline Offline
Junior Poster

Re: Program Icon.

 
0
  #3
Apr 10th, 2008
So is there not a way you can code it in?
C Plus Plus Coder.
Fourteen Years Of Age
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,585
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1487
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Program Icon.

 
0
  #4
Apr 10th, 2008
Actually I don't think you can because console programs don't have embedded icons like gui programs have.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 177
Reputation: Black Magic is an unknown quantity at this point 
Solved Threads: 4
Black Magic's Avatar
Black Magic Black Magic is offline Offline
Junior Poster

Re: Program Icon.

 
0
  #5
Apr 10th, 2008
Ok.

Off Topic : Does any one have Msn-Messenger or another IM, so i can ask help through that please
C Plus Plus Coder.
Fourteen Years Of Age
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 459
Reputation: Agni is a jewel in the rough Agni is a jewel in the rough Agni is a jewel in the rough Agni is a jewel in the rough 
Solved Threads: 71
Sponsor
Agni's Avatar
Agni Agni is offline Offline
Posting Pro in Training

Re: Program Icon.

 
0
  #6
Apr 10th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 177
Reputation: Black Magic is an unknown quantity at this point 
Solved Threads: 4
Black Magic's Avatar
Black Magic Black Magic is offline Offline
Junior Poster

Re: Program Icon.

 
0
  #7
Apr 10th, 2008
Yeah, sorry about that.
I'm learning classes atm and my little brother is telling me what to do, kind of fun .

  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class Cat
  6. {
  7. public:
  8.  
  9. unsigned int Age;
  10. unsigned int Weight;
  11. unsigned int Siblings;
  12. unsigned int Smoke;
  13. unsigned int TV;
  14.  
  15. void Meow();
  16. };
  17.  
  18. int main()
  19. {
  20. system("title Class Cat.");
  21.  
  22. Cat Elliot;
  23.  
  24. Elliot.Age = 81;
  25. Elliot.Weight = 132;
  26. Elliot.Siblings = 20;
  27. Elliot.Smoke = 0; // 0 = False, 1+ = True.
  28. Elliot.TV = 1; // 0 = False, 1+ = True.
  29.  
  30. cout << "Elliot is a cat who is " << Elliot.Age << " years old.\n" << endl;
  31. cout << "Elliot weighs " << Elliot.Weight << "kg!\n" << endl;
  32. cout << "Elliot has " << Elliot.Siblings << " siblings!\n" << endl;
  33.  
  34. if (Elliot.Smoke == 0)
  35. cout << "Elliot Does Not Smoke!\n" << endl;
  36. else
  37. cout << "Elliot Smokes!\n" << endl;
  38.  
  39. if (Elliot.TV == 0)
  40. cout << "Elliot does not watch TV!\n" << endl;
  41. else
  42. cout << "Elliot watches TV!\n" << endl;
  43.  
  44. system("PAUSE>nul");
  45. }
C Plus Plus Coder.
Fourteen Years Of Age
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,585
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1487
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Program Icon.

 
0
  #8
Apr 10th, 2008
c++ has bool data type, so use it instead of that unsigned int
  1. class Cat
  2. {
  3. public:
  4.  
  5. unsigned int Age;
  6. unsigned int Weight;
  7. unsigned int Siblings;
  8. bool Smoke;
  9. bool TV;
  10.  
  11. void Meow();
  12. };
  13.  
  14. <snip>
  15. Elliot.Smoke = false;
  16. Elliot.TV = true;
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 177
Reputation: Black Magic is an unknown quantity at this point 
Solved Threads: 4
Black Magic's Avatar
Black Magic Black Magic is offline Offline
Junior Poster

Re: Program Icon.

 
0
  #9
Apr 10th, 2008
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?

  1. class Cards
  2. {
  3. public:
  4.  
  5. unsigned int Ace;
  6. unsigned int Two;
  7. unsigned int Three;
  8. unsigned int Four;
  9. unsigned int Five;
  10. unsigned int Six;
  11. unsigned int Seven;
  12. unsigned int Eight;
  13. unsigned int Nine;
  14. unsigned int Ten;
  15. unsigned int Jack;
  16. unsigned int Queen;
  17. unsigned int King;
  18. };
Last edited by Black Magic; Apr 10th, 2008 at 9:26 am. Reason: PAUSE>nul
C Plus Plus Coder.
Fourteen Years Of Age
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,836
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 503
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: Program Icon.

 
0
  #10
Apr 10th, 2008
Originally Posted by Black Magic View Post
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?

  1. class Cards
  2. {
  3. public:
  4.  
  5. unsigned int Ace;
  6. unsigned int Two;
  7. unsigned int Three;
  8. unsigned int Four;
  9. unsigned int Five;
  10. unsigned int Six;
  11. unsigned int Seven;
  12. unsigned int Eight;
  13. unsigned int Nine;
  14. unsigned int Ten;
  15. unsigned int Jack;
  16. unsigned int Queen;
  17. unsigned int King;
  18. };

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:
  1. class Card
  2. {
  3. private:
  4. int cardValue; // will be 1 through 13
  5. char cardSuit; // 'S', 'H', 'C', 'D'
  6.  
  7. // more code
  8. };
Last edited by VernonDozier; Apr 10th, 2008 at 3:10 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC