Re: Not using .cpp files when programming...



"Alf P. Steinbach" wrote:
> robertwessel2@xxxxxxxxx:
>
.... snip ...
>>
>> Your compiles will be slower.
>
> Generally correct.
>
>> You'll have routines multiply defined when you include the same
>> .h in multiple programs that are linked together.
>
> Sorry, that's incorrect: it's not programs that are linked
> together, it's compilation units.
>
>> Or, if you make the member functions static or inline in the
>> class to avoid the name space problems,
>
> Sorry, that's incorrect: neither 'inline' nor 'static' is used
> to avoid name space problems.
>
>> you'll make a larger executable because all the code is
>> duplicated in each compiled program, perhaps many times.
>
> Sorry, that's incorrect: the main feature of 'inline' is the
> acceptance & removal of multiple definitions.

So, broadly speaking, you are in full agreement :-)

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson

.



Relevant Pages

  • RE: Help with creating a Macro
    ... I was looking back over my original message and I ... If you are trying to compute units per hour then your formula is incorrect. ... I feel a macro would be the most accurate and efficient ... Most of the order data are on multiple rows. ...
    (microsoft.public.excel.misc)
  • Re: Table design help
    ... Multiple tables is incorrect. ... On FrmOutcome, disable comment. ... Put the following code in the AfterUpdate ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Attempt at initialising a class with a vector "inline"
    ... > inline. ... Btw. the code above compiles without any errors for me. ... :: "out of confusion comes chaos -- out of chaos comes confusion and fear ...
    (comp.lang.cpp)
  • Re: [PATCH 5/6] FDPIC: Add coredump capability for the ELF-FDPIC binfmt [try #3]
    ... It compiles with no error and no warning, ... we still play games with inline ... static void fill_elf_header ... flush_cache_page(vma, addr, ...
    (Linux-Kernel)
  • Re: Executing exp as batch job fails
    ... You have multiple tnsnames.ora floating around, ... incorrect, you didn't set the TNS_ADMIN variable, and your DOS box is ... hitting the wrong one, as that one is the one in the %ORACLE_HOME% it ... out, is incorrect, the PATH in your interactive session can differ from ...
    (comp.databases.oracle.misc)