home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19732 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  823 b 

  1. Path: sparky!uunet!olivea!pagesat!netsys!ukma!tulane!rouge!rks9954
  2. From: rks9954@usl.edu (Srinivasa Rao K)
  3. Newsgroups: comp.lang.c++
  4. Subject: Friend ..Overload Assignment opertr ..
  5. Message-ID: <1993Jan22.075317.21062@usl.edu>
  6. Date: 22 Jan 93 07:53:17 GMT
  7. Organization: University of Southwestern Louisiana
  8. Lines: 37
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  Hi C++ masters,
  15.  
  16.        I have small question ...
  17.  
  18.        I am writing a "string"  class which i should be able
  19.        to use like
  20.  
  21.  
  22.        string str1;
  23.  
  24.        str1 = "Hello world" ;
  25.  
  26.  
  27.  
  28.        But We canot use a friend to overload the assignment oprator.
  29.  
  30.       So finally  I had to convince myself to use something like
  31.  
  32.  
  33.        str1 <= "Hello world"
  34.  
  35.  
  36.        which works.
  37.  
  38.       Is there any way to do the first method ....
  39.  
  40.       
  41.       Thanks for those who spend time reading this ....
  42.  
  43.  
  44.  
  45.  
  46. Rao.
  47.