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.
+ 2
Kindly use the search bar before posting a question.
Help the community avoid duplicates.
https://www.sololearn.com/discuss/1507749/?ref=app
https://www.sololearn.com/discuss/1320385/?ref=app
https://www.sololearn.com/discuss/1880728/?ref=app
https://www.sololearn.com/discuss/1487221/?ref=app
https://www.sololearn.com/discuss/1808014/?ref=app
+ 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.