0
what is the difference between const and # define function and where it can be used
2 Réponses
+ 2
define is checked by preprocessor. const by compiler.
So define changes all variables to the defined ones, but const we only call the value.
+ 1
const is for declaring a constant, it prevents you from modifying a variable for example.
#define basically does a text search and replace.