Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4234600
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:22:42+00:00 2026-05-21T02:22:42+00:00

From ISO Standard Draft: § 3.0/9 : n3234 says: A name used in more

  • 0

From ISO Standard Draft: §3.0/9:

n3234 says:

A name used in more than one translation unit can potentially refer to the
same entity in these translationunits depending on the linkage (3.5) of the
name specified in each translation unit.

Can anyone explain this point with an example, please?

What is that statement actually saying? Can any one prove this point in terms of a program?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T02:22:43+00:00Added an answer on May 21, 2026 at 2:22 am

    Sure! What this is saying is that if you have multiple source files (translation units) that both use some name (for example, the name of a variable, class or function), then it’s possible that those different files are talking about the same variable, class, or function, assuming that that entity was declared in a way that makes it visible across different files (that is, depending on its linkage).

    For example, if I have this file:

    A.cpp:

    int globalInt;
    
    int main() {
         globalInt = 137;
    }
    

    And this one here:

    B.cpp:

    extern int globalInt;
    
    void foo() {
        globalInt = 42;
    }
    

    Then in both files, the name globalInt refers to the global int variable globalInt defined in A.cpp. That’s all that this point is saying.

    Note, however, that if I declare globalInt without external linkage, then the two files will be talking about different variables. For example, in this case:

    C.cpp:

    static int globalInt;
    
    int main() {
         globalInt = 137;
    }
    

    D.cpp:

    static int globalInt;
    
    void foo() {
        globalInt = 42;
    }
    

    Now the globalInt variable referenced in C.cpp is not the same as the one in D.cpp, even though they have the same name.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A point from N3290 draft ISO Standard, §3.4.1/12: During the lookup of a name
Statement from ISO standard $3.1 : 1st point n3242 Says: A declaration (Clause 7)
I'm converting a legacy app from ISO-8859-1 to UTF-8, and I've used a number
can any one explain this? Overload resolution and partial ordering are used to select
It is not clear from the PDF ISO standard document (PDF32000-2008) whether a comment
This is the statement from ISO C++ Standard 14.6.4.1 Point of instantiation 4.If a
This is the statement from ISO C++ Standard 14.6.4.1 Point of instantiation For a
This is the statement from ISO C++ Standard 14.6.2.1: Dependent types : A type
From the C++ standard (ISO/IEC 14882:2003(E)), §12.5.4, about overloading operator delete : If a
This is the point from ISO :Standard Conversions:Array-to-pointer conversion: $4.2.1 An lvalue or rvalue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.