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 6755683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:25:56+00:00 2026-05-26T13:25:56+00:00

In our projects we decided to prefix member variables and some private/protected methods with

  • 0

In our projects we decided to prefix member variables and some private/protected methods with underscore (so with “_”).

During a discussion it was claimed that this is discouraged to do because of some incompatibilities with some compilers/linkers on some platforms. As we want to be a portable as possible I’d like to be sure.

I also reckon that prefixing globals with underscores in C can be a problem.

Does the same apply to C++-linkage and if so, in which cases (platforms/compilers/linkers)?

  • 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-26T13:25:57+00:00Added an answer on May 26, 2026 at 1:25 pm

    From the C++03 standard: §17.4.3.1.2/1

    Certain sets of names and function signatures are always reserved to the implementation:

    • Each name that contains a double underscore (__) or begins with an underscore followed by an upper-case letter (2.11) is reserved to the implementation for any use.

    • Each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace.

    The equivalent text is present in C++11 §17.6.4.3.2/1

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

Sidebar

Related Questions

I am implementing some networking stuff in our project. It has been decided that
In some of our projects, there's an class hierarchy that adds more parameters as
On one of projects that I'm working on, we decided to change our presentation
Some Background I have been using Git for a while now. The projects that
We have decided to take the plunge and require that our users have .NET
We currently use subversion as our version control system, we have decided that we
We've just newly decided to use NServiceBus on our project and we're experiencing some
I joined a project yesterday, we decided to merge our two projects into one,
Our organization has decided that my project will be developed for internal use with
Our projects are using objects as the data source to reports. Our business layer

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.