title: Difference between an object and a variable in C++
body: <p>I am learning C++ using the books listed <a href="https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list">here</a>. My question is that is there a difference between a variable and an object. Consider the following example:</p>
  <pre><code>int i = 0; //i is an object of type int. Or we can say i is a variable of type int
  int &amp;refI = i; //refI is a &quot;reference variable&quot; of &quot;reference type `int&amp;`. But here refI is not an object. 
  </code></pre>
  <p>My current understanding is that both of the terms variable and object overlaps to a large extent. But in some contexts like in case of <code>refI</code> above, there can be some differences. In particular, <code>refI</code> is a reference variable of <strong>reference type <code>int&amp;</code></strong> and <code>refI</code> is not an object because a reference is an alias for some other object. While <code>i</code> is both an object and a variable.</p>
  <p>My question is that am i correctly analyzing the <code>refI</code> case above? If not, what does the standard say about this.</p>
  <p>My second question is that, does the standard C++ strictly differentiate between these two terms. If yes, how and where. For example something like,</p>
  <blockquote>
  <p><em><strong>a variable may be defined as an object with a name. And any object without a name is not a variable.</strong></em></p>
  </blockquote>
  <p><a href="https://stackoverflow.com/questions/71529819/contradicting-definition-of-references/71530064?noredirect=1#comment126425620_71530064">Here</a> the user says that a variable and object are different.</p>
  <h4>Edit</h4>
  <p>I am also asking this question because i am aware that in Python(as it is a dynamically typed language) there is a clear distinction between variables and objects. Does the C++ standard also make such a clear distinction.</p>