-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I have a habit of not using const which is probably not great, see for example:
https://www.reddit.com/r/C_Programming/comments/bg3bdq/comment/eli19si/
There's a concept called "const correctness" that basically means that variables should be declared "read only" (const, or constant) if they are indeed read-only. It's basically an additional type in the typing system, which lets the code and compiler help you make optimally-correct programs.
It can be a good exercise to go back to your code and find out where you can add
constand where you can't.
Best to go through the whole code looking for these.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels