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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:29:11+00:00 2026-05-26T15:29:11+00:00

When is an ‘identifier’ called a ‘name’ in C++? I mostly read that the

  • 0

When is an ‘identifier’ called a ‘name’ in C++? I mostly read that the term `name’ is used overly instead of ‘identifier’ as in the example:

struct S { int i };
S thing1;

In this case, is the thing1 a name or identifer? Or are the terms ‘identifier’ and ‘name’ are analogous? In C, is there a use of the term ‘name’ when referring to an object?

  • 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-26T15:29:12+00:00Added an answer on May 26, 2026 at 3:29 pm

    In C++, the term identifier is just a sequence of digits, letters and _, not starting with a digit. Such an identifier can appear anywhere, and doesn’t have to identify anything, despite its name (no pun intended).

    The term name associates a meaning with a certain grammar construct. The C++ spec says that one of the following grammar constructs is a name if it denotes an entity (an object, a class, a template and so on) or a label (where you can jump to with goto)

    • identifier
    • template-id (identifier <...>, operator-function-id <...> and literal-operator-id <...>, as in foo <int>).
    • conversion-function-id (operator type, as in operator int)
    • operator-function-id (operator @, as in operator +)
    • literal-operator-id (operator "" identifier, as in operator "" _foo)

    For each of these constructs, the rule when a name is the same as another name is defined differently: For identifiers, two names are the same of the sequence is the same (this is only a lexical comparison). For names of form conversion-function-id they are the same if the type used is the same type (so this is a semantic comparison).

    As you can see in the example of literal-operator-id, the non-terminal identifier can appear in the grammar in places where it is not a name. So not every identifier is a name, and not every name is an identifier. In the example of template-id, we have a nested use of names. The constructs before the <...> respectively are names again, as they denote declared templates.

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I am trying to create a RegEx expression that will successfully parse the following
I'm taking a photo with my app, the delegate method is called, the Image
i got an object with contents of html markup in it, for example: string
I need a function that will clean a strings' special characters. I do NOT
I have a reasonable size flat file database of text documents mostly saved in
I'm trying to create an if statement in PHP that prevents a single post
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.