Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
#define is propecced by the preprocessor before compilation where as consts are processed by the compiler.
29th Jan 2020, 7:20 AM
Sonic
Sonic - avatar
+ 2
#define is used to define some values with a name (string), this defined string is known as Macro definition in C or C++; while const is a keyword used to make the value of an identifier unchangeable after it is given its value.
29th Jan 2020, 6:47 AM
Fernando Pozzetti
Fernando Pozzetti - avatar