n3035 says: (2010-02-16)
A variable is introduced by the declaration of an object. The variable's name denotes the object.
n3090 says: (2010-03-29)
A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name denotes the reference or object.
n3242 says: (2011-02-28)
A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name denotes the reference or object.
CAN any one explain the difference interms (or) with the help of an program(exactly what it say's)
this is the statement from ISO standard C++
I seen this link :
Why was the definition of a variable changed during the development of C++11?
but this is not(full meaning) my question ...
When it means “anybody,” “anyone” is spelled as a single word: “anyone can enter the drawing.” But when it means “any single one,” “any one” is spelled as two words: “any one of the tickets may win.”
Meaning. Describe: Describe means to give a lot of details and paint a verbal picture of a situation or idea. Explain: Explain means to make an idea or situation clear to someone by describing it in more detail or revealing relevant facts.
'Could you' is more polite than 'Can you' and it sounds better - particularly if you are asking someone to do something for you.
The Main Difference Between SOME and ANY As a general rule, we use 'some' for affirmative sentences, and 'any' for questions or negative sentences. Usually, both 'some' and 'any' can only be used with countable plural nouns or uncountable nouns.
Consider:
int x = 42;
int& rx = x;
x
is a variable; should rx
also be considered a variable? Many of the Standard's requirements about non-reference variables also apply to references. It's obviously a pain to have to stipulate "variables or references to variables" constantly throughout the Standard, so if the definition of a variable can include references - perhaps with the occasional "except for references", then the Standard may be - on balance - simplified. It looks to me like the revisions were exploring this balance.
This was a CWG defect #633 in ISO C++03
Also check out n2993
that deals with core issue# 633
i.e
"Specifications for variables that should also apply to references"
The goal of these changes is to expand the meaning of "variable" to encompass both named objects and references, and to apply the term consistently wherever feasible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With