I always mess up how to use const int*
, const int * const
, and int const *
correctly. Is there a set of rules defining what you can and cannot do?
I want to know all the do's and all don'ts in terms of assignments, passing to the functions, etc.
转载于:https://stackoverflow.com/questions/1143262/what-is-the-difference-between-const-int-const-int-const-and-int-const