| | |
Program Icon.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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
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
Fourteen Years Of Age
Use an icon editor to create the icon then windows explorer to change the program's icon.
Or these links
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.
Yeah, sorry about that.
I'm learning classes atm and my little brother is telling me what to do, kind of fun
.
I'm learning classes atm and my little brother is telling me what to do, kind of fun
. C++ Syntax (Toggle Plain Text)
#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 Plus Plus Coder.
Fourteen Years Of Age
Fourteen Years Of Age
c++ has bool data type, so use it instead of that unsigned int
C++ Syntax (Toggle Plain Text)
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;
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.
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?

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?
C++ Syntax (Toggle Plain Text)
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; };
Last edited by Black Magic; Apr 10th, 2008 at 9:26 am. Reason: PAUSE>nul
C Plus Plus Coder.
Fourteen Years Of Age
Fourteen Years Of Age
•
•
Join Date: Jan 2008
Posts: 3,836
Reputation:
Solved Threads: 503
•
•
•
•
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?
C++ Syntax (Toggle Plain Text)
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:
C++ Syntax (Toggle Plain Text)
class Card { private: int cardValue; // will be 1 through 13 char cardSuit; // 'S', 'H', 'C', 'D' // more code };
Last edited by VernonDozier; Apr 10th, 2008 at 3:10 pm.
![]() |
Other Threads in the C++ Forum
- Previous Thread: quick question
- Next Thread: help please !!
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






