by Mark McIntyre <markmcintyre@[EMAIL PROTECTED]
>
May 5, 2008 at 12:18 PM
Bartc wrote:
> I noticed that in C, functions in any module are automatically ex****ted.
So
> that it's not possible to use the same function name in two modules (ie.
> source files).
>
> Now that I know that, I get work around it; but is there a way to avoid
the
> problem (short of lots of renaming)?
>
> More seriously, variables declared at file scope also seem to be
> automatically ex****ted. But in this case, the compiler/linker doesn't
warn
> me that the same name is being used in two or more modules.
Turn up warninglevels in your linker.
> Is there any way I can fix this? (Like some keyword that will render a
> variable local to a module.)
Read your C book... :-) Keyword static.
--
Mark McIntyre
CLC FAQ <http://c-faq.com/>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>