Thread: overloading >> operator

  1. #1
    Registered User Diamonds's Avatar
    Join Date
    Oct 2002
    Posts
    68

    overloading >> operator

    Code:
    class Property {
    public:
     Property();
     void operator >>(Property p);
    private:
     char *owner[256];
    };
    
    Property::Property() {}
    
    Property:: operator >> (Property p) {
     cin>>owner;
    }
    
    int  main () {
     Property p;
     cin>>p;
    }
    This method is telling me that no operator for >> the class Property. Can someone please help me overload this operator, thnx.
    Last edited by Diamonds; 03-21-2003 at 12:46 AM.

  2. #2
    Registered User Diamonds's Avatar
    Join Date
    Oct 2002
    Posts
    68
    forget it, foudn it

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. unary operator overloading and classes
    By coletek in forum C++ Programming
    Replies: 9
    Last Post: 01-10-2009, 02:14 AM
  2. Smart pointer class
    By Elysia in forum C++ Programming
    Replies: 63
    Last Post: 11-03-2007, 07:05 AM
  3. Operator Overloading (Bug, or error in code?)
    By QuietWhistler in forum C++ Programming
    Replies: 2
    Last Post: 01-25-2006, 08:38 AM
  4. C++ Operator Overloading help
    By Bartosz in forum C++ Programming
    Replies: 2
    Last Post: 08-17-2005, 12:55 PM
  5. operator overloading and dynamic memory program
    By jlmac2001 in forum C++ Programming
    Replies: 3
    Last Post: 04-06-2003, 11:51 PM