Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Pixel_Sticks

  • Rank
  1. Pixel_Sticks

    Questions about C# and VB.NET

    Thanks for the input. I guess it will be off to the library for a C# book. :)
  2. I have two projects in mind that I want to work on and since I have no experience at all in either C# or VB I would like to get opinions on which would be more suited for my goals. I am looking to create a small database program to catalogue magazines so I can log them and later search under certain keywords to return the correct issue. Next is a flash card program. I am a Spanish major and I want to learn other languages as well and I want to create my own flash card system. I use one now called CueCards which is good, but I would like to make my own and have my own custom features. Judging by this can anyone tell me which would be more suited for my needs. I realize that both would probably work find, but I am looking for the one that is generally considered to have a faster work flow and perhaps easier for a beginner to get going with. Thanks
  3. Pixel_Sticks

    Trigonometry/ right triangles question

    Thanks for all the info, guys. I was worried that I would be banished for asking such a question. :P
  4. I know this is probably very basic math for anyone remotely associated with computer programming, but its been a while since I had any sort of math class. I wanted to start on an OpenGL book, but I realize that my math skills are extremely lacking. Unfortunately the highest level math class I have had was college algebra and that was 4 years ago. I am a Spanish major and obviously there isnt much math required for the degree. Until today I didnt even have a clue what sin/cos was... :| Anyway, I want to be able to calculate the sin/cos of an angle, which I can now do if I know the lengths of the triangle, but my problem is that I dont know how to find the missing sides if it isnt laid out for me in some example or something. Can someone tell the equation I need to learn about to do this or just simply point a lost newbie in the right direction? I have been reading a lot today and catching up, but I still have a long way to go. Actually I might just be confusing myself. :P Thanks
  5. Pixel_Sticks

    Inheritance/constructor question

    Thanks for the help, guys. I have it sorted now.
  6. Pixel_Sticks

    Inheritance/constructor question

    What confuses me is "Dog dobbie (4, 20, DOBERMAN);" I figured the age for Mammal would end up being set to 4. I made the Mam1 object just to test that and output the age. The output: Mam1 is 1 years old.
  7. Continuing to work my way through my C++ book and I have a question about the program below. #include <iostream> using namespace std; enum BREED {GOLDEN, CAIRN, DANDIE, SHETLAND, DOBERMAN, LAB}; class Mammal { public: Mammal(); Mammal(int age); ~Mammal(); //accessors int GetAge() const {return itsAge;} void SetAge(int age) {itsAge = age;} int GetWeight() const {return itsWeight;} void SetWeight(int weight) {itsWeight = weight;} //other methods void Speak() const {cout << "Mammal sound.\n";} void Sleep() const {cout << "Shhh. I'm sleeping.\n";} protected: int itsAge; int itsWeight; }; class Dog: public Mammal { public: Dog(); Dog(int age); Dog(int age, int weight); Dog(int age, BREED breed); Dog(int age, int weight, BREED breed); ~Dog(); //accessors BREED GetBreed() const {return itsBreed;} void SetBreed(BREED breed) {itsBreed = breed;} //other methods void WagTail() const {cout << "Tail wagging...\n";} void BegForFood() const {cout << "Begging for food...\n";} private: BREED itsBreed; }; Mammal::Mammal(): itsAge(1), itsWeight(5) { cout << "Mammal constructor...\n"; } Mammal::Mammal(int age): itsAge(age), itsWeight(5) { cout << "Mammal (int) constructor...\n"; } Mammal::~Mammal() { cout << "Mammal deconstructor...\n"; } Dog::Dog(): Mammal(), itsBreed(GOLDEN) { cout << "Dog constructor...\n"; } Dog::Dog(int age): Mammal(age), itsBreed(GOLDEN) { cout << "Dog (int) constructor...\n"; } Dog::Dog(int age, int weight): Mammal(age), itsBreed(GOLDEN) { itsWeight = weight; cout << "Dog(int, int) constructor...\n"; } Dog::Dog(int age, int weight, BREED breed): Mammal(age), itsBreed(breed) { itsWeight = weight; cout << "Dog(int, int, BREED) constructor called...\n"; } Dog::Dog(int age, BREED breed): Mammal(age), itsBreed(breed) { cout << "Dog(int BREED) constructor called...\n"; } Dog::~Dog() { cout << "Dog deconstructor...\n"; } int main() { Mammal Mam1; Dog Fido; Dog Rover(5); Dog Buster(6, 8); Dog Yorkie (3, GOLDEN); Dog Dobbie (4, 20, DOBERMAN); Fido.Speak(); Fido.WagTail(); cout << "Mam1 is " << Mam1.GetAge() << " years old.\n"; cout << "Yorkie is " << Yorkie.GetAge() << " years old.\n"; cout << "Dobbie weighs " << Dobbie.GetWeight() << " pounds.\n"; return 0; } In all of the dog constructors there is the line "Mammal(age)" line. The Mammal(int) constructor is being called each time, but im not sure why its not getting itsAge also set to a new value each time due to passing in a new age with each new dog object creation. Im sure I have something confused and if someone could point it out I would appreciate it. ;)
  8. Pixel_Sticks

    Question about overloading the prefix operator

    Quote:Original post by Paulius Maruska Edit: i'm too slow... :/ no way man Im glad I got to read your reply before you edited it. Im sure swiftcoder provided a good example its just that it was a little too high level for me. I just started reading this book two weeks ago and my brain is getting overloaded I think. Thanks to both of you!
  9. Pixel_Sticks

    Question about overloading the prefix operator

    Thanks for the reply Paulius. I think I understand the deconstructor calls now.
  10. Pixel_Sticks

    Question about overloading the prefix operator

    Swift Sorry im a bit confused by the example. The part "return *this;" isnt discussed until a few pages up and im trying to wrap my head around understanding the general idea before learning to optimize it. Thanks though
  11. I have been reading a C++ book and I am trying to understand the concept of overloading the prefix operator. I have read about overloading functions and how they could have the same name if their parameter lists were different. That I understood. Now it is talking about overloading the prefix operator except my understand is there would be different functions with the same name so im a little confused. Here is the program that has me scratching my head. #include <iostream> using namespace std; class Counter { public: Counter(); ~Counter() {} int GetItsVal() const {return itsVal;} void SetItsVal(int x) {itsVal = x;} void Increment() {++itsVal;} Counter operator++ (); private: int itsVal; }; Counter::Counter(): itsVal(0) {} Counter Counter::operator++() { ++itsVal; Counter temp; temp.SetItsVal(itsVal); return temp; } int main() { Counter i; cout << "The value of i is " << i.GetItsVal() << endl; i.Increment(); cout << "The value of i is " << i.GetItsVal() << endl; ++i; cout << "The value of i is " << i.GetItsVal() << endl; Counter a = ++i; cout << "The value of a is: " << a.GetItsVal(); cout << " and i: " << i.GetItsVal() << endl; return 0; } Also in my program I added a cout line to the destructor to help me a little and I see that when this function returns the destructor is called twice and im not sure why. Counter Counter::operator++() { ++itsVal; Counter temp; temp.SetItsVal(itsVal); return temp; } Im very confused overall by this program. :(
  12. Pixel_Sticks

    Problems with Microsoft Word and im out of ideas.

    Thanks ViLiO. Before I tried your suggestions I sat and thought and a possible simple solution hit my mind. For the first time I tried to system restore option and now its back to normal.
  13. I went into the control panel and added support for the Japanese language following an online guide. Then I opened word to see if it worked and it asked me to insert my setup cd. I put in my cd and it said it couldnt find WORDRET.MSI. I looked online and I saw that other people had the problem before and I found a link to the microsoft website that had a "fix". Keep in mind after this message I was still able to open Word if I pressed cancel but it was some weird template and when I tried to open already existing Word files the program would open but not open the actual file that I had worked on. Anyway, the fix said I had to uninstall Word and basically install again. I uninstalled and now I cant reinstall. I will put in the CD and go through the process but its almost like its telling me that Word isnt available on my CD or something all the sudden. I tried two and it does the same thing. During setup it will be done in an instant skipping over the actual install to verifying the install. So it gets done and I check and Word is nowhere to be found on my system. I cant find it in the program files on the startup menu but it is showing up in the add/remove programs list. I dont have a clue what the problem is or what I can do to fix this. I had a lot of work to do for class today (in Word) and now im gonna spend a lot of time trying to fix this. :( If anyone has some tips I would appreciate it.
  14. Pixel_Sticks

    Can someone help me choose a mobo?

    Ya I ended up making changes to the order. I went with the amd 64 3200+, GIGABYTE GA-K8NU-SLI Socket 939 NVIDIA nForce4 SLI ATX AMD Motherboard, gig of corsair ram, 250 seagate hd, pretty cool looking case with 420 watt psu. I am also buying my cousins geforce 6600GT for 100 bucks. Everything that I bought came to 719.00 including the video card and shipping. I was also very happy when I found out that there was no tax when I bought this stuff. :)
  15. Pixel_Sticks

    Another Relationship Problem

    Quote:Original post by Mark Duffill lol, I'd recommend buying a banjo! :D If I had water in my mouth when I read that it would have been spit out all over my screen. :D
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!