Does C++11 have C#-style properties?

前端 未结 15 1090
伪装坚强ぢ
伪装坚强ぢ 2020-11-28 03:16

In C#, there is a nice syntax sugar for fields with getter and setter. Moreover, I like the auto-implemented properties which allow me to write

public Foo fo         


        
15条回答
  •  再見小時候
    2020-11-28 03:36

    Nope.. But you should consider if it`s just get : set function and no additional task preformed inside get:set methods just make it public.

提交回复
热议问题