This operator is a convenient substitute for the SetAt method. You can only use it on the left side of an assignment statement (an l-value). If there is no map element with the specified key, then a new element is created.
There is no “right side” (r-value) equivalent to this operator because there is a possibility that a key may not be found in the map. Use the Lookup method for element retrieval.
Header file: | Afxtempl.h |
Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: | 1.0 and later |
Complete documentation: | Visual C++ documentation |
VALUE& operator[]( ARG_KEY key );