Re: Global Instance

From: Bruce Eitman \(eMVP\) (beitmannospam_at_NOSPAM_applieddata.NOSPAM_net)
Date: 07/25/04


Date: Sun, 25 Jul 2004 18:35:29 -0400

Well, seeing how you are declaring it would be helpful.

But I suspect that you need to become familiar with "extern" From your
description, it sounds like you are declaring it in the header file, which
is bad. It should be extern in the header and declared in *one* C/C++ file.

-- 
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net
Applied Data Systems
 www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member


Relevant Pages

  • Re: extern
    ... >> without extern. ... > I'd *highly* suggest you use the extern keyword when declaring external ... 6.9.2/2 "A declaration of an identifier for an object that has file ... If a translation unit contains one or more tentative ...
    (comp.lang.c)
  • Re: using libc from nasm
    ... I am trying to learn asm with NASM on a FreeBSD system. ... I don't think declaring these "extern" in your file is going to help. ...
    (comp.lang.asm.x86)
  • Re: External structs - newbie question
    ... Declaring it in a header file is the right way to go. ... You should declare it extern in the header, ... Below I've given an example layout for your header file. ... int main ...
    (comp.lang.c)
  • Re: Extracting data symbols from an archive using dlsym
    ... I tried declaring it extern. ... why I tried going for the dlopen/dlsym approach. ... The library is in archive format. ...
    (comp.unix.programmer)
  • Re: confused about extern use
    ... Here in the above example I am confused about, what extra the coder ... going to achieve by declaring it as extern in the header file a.h. ...
    (comp.lang.c)