What if the implementation of a class is split into separate files

DrFebruary@yahoo.com (Sean)
13 Jul 2004 11:15:45 -0400

          From comp.compilers

Related articles
What if the implementation of a class is split into separate files DrFebruary@yahoo.com (2004-07-13)
Re: What if the implementation of a class is split into separate files bje@air.net.au (Ben Elliston) (2004-07-17)
| List of all articles for this month |
From: DrFebruary@yahoo.com (Sean)
Newsgroups: comp.compilers
Date: 13 Jul 2004 11:15:45 -0400
Organization: http://groups.google.com
Keywords: C++, question
Posted-Date: 13 Jul 2004 11:15:45 EDT

Hi There:


I came across somebody's code that split the implementation of one
class into separate files. For example, instead of put


myClass::foo()
{
}


and


myClass::bar()
{
}


in one, let's say, myClass.cpp, this guy put myClass::foo in
myClassfoo.cpp and put myClass::bar in myClassbar.cpp.


My question is:
1. what is the difference, if any, in the code that the compiler
generates? 2. is there any difference on the performances between
these two ways?


Thanks,


Sean
[It depends on the compiler, but so long as the interfaces are correcty
defined in header files, I wouldn't think it'd make much difference. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.