home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 20114 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.2 KB  |  33 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!darwin.sura.net!mojo.eng.umd.edu!russotto
  3. From: russotto@eng.umd.edu (Matthew T. Russotto)
  4. Subject: Re: Duplicate Object in Think C?
  5. Message-ID: <1992Dec20.160310.28061@eng.umd.edu>
  6. Date: Sun, 20 Dec 92 16:03:10 GMT
  7. Organization: Project GLUE, University of Maryland, College Park
  8. References: <white.724729120@sfu.ca>
  9. Lines: 22
  10.  
  11. In article <white.724729120@sfu.ca> white@fraser.sfu.ca (Steve White) writes:
  12. >How do you duplicate an object without knowing its class?  We would like
  13. >to write something like
  14. [...] 
  15. >sizeof( class_name )
  16. >will return the size of an object in a class.  We get "illegal use of
  17. >class type" when we try to compile, e.g., 
  18. >sizeof( Window )
  19.  
  20. You can't get the size of an object which has private members (except
  21. within that object).
  22.  
  23. And since typing is done at compile time, you can't set the type of an
  24. object through assigment.  I think you are trying to do something not
  25. supported by the paradigm.
  26. -- 
  27. Matthew T. Russotto    russotto@eng.umd.edu    russotto@wam.umd.edu
  28. Some news readers expect "Disclaimer:" here.
  29. Just say NO to police searches and seizures.  Make them use force.
  30. (not responsible for bodily harm resulting from following above advice)
  31.