home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16071 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.5 KB

  1. Path: sparky!uunet!europa.asd.contel.com!emory!sol.ctr.columbia.edu!spool.mu.edu!agate!netsys!news!lsi!mhost!cl301!ameesh
  2. From: ameesh@lsil.com (Ameesh Desai)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Wanted: Example of Contravariance
  5. Message-ID: <1992Nov10.195355.19698@lsil.com>
  6. Date: 10 Nov 92 19:53:55 GMT
  7. References: <rmartin.721098936@thor>
  8. Sender: news@lsil.com (news caster)
  9. Reply-To: ameesh@lsil.com
  10. Organization: LSI Logic Corporation
  11. Lines: 34
  12. Nntp-Posting-Host: cl301
  13.  
  14. In article 721098936@thor, rmartin@thor.Rational.COM (Bob Martin) writes:
  15. >srheintze@happy.colorado.edu writes:
  16. >
  17. >>Can someone please give me a small example of contravariance I can compile and 
  18. >>run with Borland C++ v3.1 or Microsoft C++ v7?
  19. >
  20.  
  21. [suff deleted]
  22.  
  23. >class B
  24. >{
  25. >  public:
  26. >    virtual B& void f(B&);
  27.         ^^^^^^^^^^^^^^ ???? what is "virtual B& void f(B&)" ?
  28.         Am I missing something here or is this a syntax error ? 
  29. >};
  30.  
  31. [stuff deleted]
  32.  
  33. >
  34. >--
  35. >Robert Martin                        Training courses offered in:
  36. >R. C. M. Consulting                       Object Oriented Analysis
  37. >2080 Cranbrook Rd.                        Object Oriented Design
  38. >Green Oaks, Il 60048 (708) 918-1004       C++
  39.  
  40.  
  41.  
  42. ---
  43. ______________________________     o__            
  44. | _   /|     Ameesh Desai     \    ,>/_                              
  45. | \`O.o'     LSI Logic Corp.   \__(_)`(_)_              email: ameesh@lsil.com
  46. | =(_|_)=    MS E192, 1501 McCarthy Blvd. \             fax  : (408) 433-6802
  47. |____U_______Milpitas, CA 95035____________\____________voice: (408) 433-4097 
  48.