Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ra!minnie!cordova From: cordova@minnie.tmc.edu (Jose Cordova) Newsgroups: comp.lang.c++ Subject: Re: Optimization of inline functions Message-ID: <148@ra.MsState.Edu> Date: 30 Mar 91 17:18:05 GMT References: <1894@hpwala.wal.hp.com> Sender: usenet@ra.MsState.Edu Distribution: usa Organization: Computer Science Dept., Mississippi State University Lines: 29 Nntp-Posting-Host: minnie.cs.msstate.edu In article <1894@hpwala.wal.hp.com> boba@hpwarau.UUCP (Bob Alexander) writes: >I realize that the C++ definition does not require the compiler to pay >attention to the inline keyword, just as C compilers are not required to >pay attention to the register keyword. But is there a way to get TC++ >to compile inline? Or, is there another way to have read-only class >variables? You might want to try the following and see if it makes any difference: class Shmoo { public: int getCounter(); private: int counter; } inline int Shmoo::getCounter() { return counter; } -- ************************************************************************ Jose Cordova - Department of Computer Science - Mississippi State Univ. cordova@walt.cs.msstate.edu ************************************************************************