mardi 23 avril 2019

Why is a string literal considered as an lvalue expression when it cannot be referenced?

I am trying to understand lvalue expressions.

In the following link cppreference-value-categories I read the following statement under the 'lvalue' section.

The following expressions are lvalue expressions:

a string literal, such as "Hello, world!";

Could someone explain why this is an lvalue rather than a rvalue?

Aucun commentaire:

Enregistrer un commentaire