Path: utzoo!attcan!uunet!husc6!think!ames!pasteur!ucbvax!ucsd!hub!gauss!mwette From: mwette@gauss.ucsb.edu (Matt Wette) Newsgroups: comp.lang.c++ Subject: Re: access functions Message-ID: <624@hub.ucsb.edu> Date: 16 May 88 22:40:52 GMT References: <11152@mimsy.UUCP> <6590046@hplsla.HP.COM> <1027@unmvax.unm.edu> Sender: news@hub.ucsb.edu Reply-To: mwette@gauss.UUCP (Matt Wette) Organization: University of California, Santa Barbara Lines: 33 In article <1027@unmvax.unm.edu> mike@turing.UNM.EDU.UUCP (Michael I. Bushnell) writes: > >Nothing, obviously. This code is better written as >struct IntVal >{ > public: > value; >}; >Get the picture? If you think that you really NEED access functions, >you might as well just make it a struct. > N u m q u a m G l o r i a D e o > Michael I. Bushnell What about ... class IntVal { int val; public: int value() { return val; } void value(int aval) { val = aval; } }; Matt Wette _____________________________________________________________________________ Matthew R. Wette | ARPA: mwette%gauss@hub.ucsb.edu Scientific Computation Lab | UUCP: ucbvax!ucsbhub!gauss!mwette Dept. Elec. and Comp. Eng. | University of California | Santa Barbara, CA 93106 | -----------------------------------------------------------------------------