T
Tapeesh
In C++, why does assignment operator always return a lvalue. Even in
cases of assignment of basic datatypes like int ?
For eg.
int main()
{
int a, b, c;
a = b + c;
return 0;
}
Here, in the above example the assigment returns an lvalue in C++,
whereas in C it would be a rvalue.
Is it a C++ standard ? If yes, then what is the logic behind doing such
a thing????
cases of assignment of basic datatypes like int ?
For eg.
int main()
{
int a, b, c;
a = b + c;
return 0;
}
Here, in the above example the assigment returns an lvalue in C++,
whereas in C it would be a rvalue.
Is it a C++ standard ? If yes, then what is the logic behind doing such
a thing????