Possible better way to change occurrences

The recommendation in the lesson “Naming and self documenting code” is that for changing multiple occurrences, you should use the “Change all occurrences” function, but i believe it’d be better to use a smarter refactoring tool like “rename symbol”. this avoids it automatically choosing occurrences that happen in a string. e.g.
const int a
if we select all occurrences of “a” it’s going to find things in the string like “you are a secret agent”
using “rename symbol” will provide you with a checked list to be changes which defaults to not changing strings.
is this a good assumption?

This feature wasn’t implemented at the time the lecture was recorded. It’s covered in a later lecture when it was.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms