title: How can I fix "& requires l-value"
body: <p>So, I created a project and copied <a href="https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Samples/Desktop/D3D12HelloWorld/src/HelloWindow" rel="nofollow noreferrer">this tutorial</a> in it. When I tried to run it, it gave me this error: <code>C2102 &amp; requires l-value</code> at</p>
  <pre><code>m_commandList-&gt;ResourceBarrier(1, &amp;CD3DX12_RESOURCE_BARRIER::Transition(m_renderTargets[m_frameIndex].Get(), D3D12_RESOURCE_STATE_PRESENT, D3D12_RESOURCE_STATE_RENDER_TARGET));
  </code></pre>
  <p>I searched a lot but i found nothing that fits in the context. What can I do to fix it?</p>