What is the official name of C++'s arrow (->) operator?

后端 未结 11 488
死守一世寂寞
死守一世寂寞 2020-12-09 00:47

I always call it the \"arrow operator\", but I\'m sure it has an official name. I quickly skimmed the C++ standard and didn\'t see it mentioned by name.

11条回答
  •  北海茫月
    2020-12-09 01:27

    I've heard it referred to a few different ways, was never sure any one in particular was more official than another.

    • Member Selection Operator
    • Pointer Dereferencing Operator
    • "the arrow thingy"

    and I'm sure there are others. personally I'm less concerned about what its called in a book or an official spec and more concerned that people know what I mean when I refer to it, so in my opinion "arrow thingy" is the best name for it since its the easiest to understand clearly what is being referred to.

提交回复
热议问题