C++ operator[ ] on integer litteral
- by gregseth
I found this piece of code:
char a = 1["ABC"];
A few quick test led me to the fact it was the same than writing:
char a = "ABC"[1];
Which seems far more logical to me. So my questions:
Why is this notation valid?
Is there any reason to write something that way?