On Tue, 25 Mar 2003 23:06:17 -0500
"Steven T. Hatton"
I thought Bjarne Stroustrup did that. ;-) He invented C++ and he also is an associate of Kernighan and Ritchie at Bell Labs.
I guess that is part of what I'm not clear on. From my perspective, the only code in a program outside of main() should, if at all possible, be contained in classes. If I accept that class definitions are properly placed in the header files, then I would only have main.cpp and a bunch of header files. Not so. Each class you define (in a header file) contains functions (I prefer to call them methods). Those functions may be inline (and expanded at instanciation time), but larger functions that are not inline should be defined in a source module. Whether a function should be inline or not depends on many factors. Additionally, it is not imperative that all functions in a C++ program be class members.
I think your comments on the linker are correct. I'm in a bit of a
hurry. I'll respond to the rest of the email later.
--
--
Gerald Feldman