The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Okay, now my compiler just thinks it's funny. by Llyr2002-09-29 13:54:40
  Nah, it thinks you're funny. by Arcanum2002-09-29 14:00:45
    And, hey, it could be worse. by Arcanum2006-11-19 12:55:59
      Maybe you can figure out what's wrong here. (n/t) by Llyr2002-09-29 14:09:00
        My header file: by Llyr 2002-09-29 14:09:36
#ifndef point_h
#define point_h

class point {
    friend ostream &operator<<(ostream &, point &);
    friend istream &operator>>(istream &, point &);
    friend point &operator+(point, point);
    friend point &operator-(point, point);
    friend point &operator*(point, point);
    friend point &operator/(point, point);
    friend void distance(point, point);
    friend void midpoint(point, point);
    friend bool operator==(point, point);
    friend bool operator!=(point, point);
    public:
        point(double = 0.0, double = 0.0);
        ~point();
        void rotate(double = pi);
        double getX();
        double getY();
        void XY2Pol(point); //this should take a rectangular and return it in polar
        void Pol2XY(point); //this should take a polar and return a rectangular
        void setX();
        void setY();
        void setR();
        void setTH();
        void setPoint(double, double); //toil and trouble,
        void getPoint();              //fire burn and cauldron bubble :)
    private:
        double x;
        double y;
        double r; //these two are for polar
        double th;
        const static double pi = 3.1415926535897932384; //for polar things... I just like to be accurate :)
};

#endif
[ Reply ]
          And my function definitions. by Llyr2002-09-29 14:10:24
            Slap those two in a project by Llyr2002-09-29 14:11:08
              Well, for starters... by Arcanum2002-09-29 14:31:09
                Where do I have "r" defined elsewhere? by Llyr2002-09-29 14:37:11
                  In your header file. by Arcanum2002-09-29 14:42:09
                    That's the ONLY r I have! by Llyr2002-09-29 14:45:02
                      No... by Arcanum2002-09-29 14:52:59
                        oh. (n/t) by Llyr2002-09-29 15:18:57
                          Okay, revised def. code. by Llyr2002-09-29 15:23:55
                            Aren't you getting a whole bunch of by Arcanum2002-09-29 15:43:10
                              Aaahhhh. There we go. (n/t) by Llyr2002-09-29 16:02:07
                                First rule of debugging compile-time errors: by Arcanum2002-09-29 16:06:04
                                heh. (n/t) by Llyr2002-09-29 16:08:51
                          Oh, about the cout statement in your midpoint fcn. by Arcanum2002-09-29 15:26:38
                            That's why I overloaded the << operator. (n/t) by Llyr2002-09-29 16:09:14
                              But you haven't written a function by Arcanum2002-09-29 16:16:27
                                Required. by Llyr2002-09-29 16:19:06
                                Ahh, ok... by Arcanum2002-09-29 16:30:14
                                It actually shouldn't be bad. (n/t) by Llyr2002-09-29 16:33:38
                                Let me know how you do it. (n/t) by Arcanum2002-09-29 16:36:12
                                I just need to know... by Llyr2002-09-29 16:40:17

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)