When to use inout parameters?

前端 未结 7 1592
情书的邮戳
情书的邮戳 2020-12-13 03:15

When passing a class or primitive type into a function, any change made in the function to the parameter will be reflected outside of the class. This is basically the same t

7条回答
  •  抹茶落季
    2020-12-13 03:47

    Basically it is useful when you want to play with addresses of variable its very useful in data structure algorithms

提交回复
热议问题