What is the main point of #define? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 3

What is the main point of #define?

What is the main point of #define, if it is a constant that allows you to replace anything you want with "turn off" some lines of code if it does not fit for something, or create a short function, but why it is actively used in all libraries and how it is on affect them?

4th Apr 2018, 2:55 PM
King Sam
King Sam - avatar
4 Respuestas
+ 1
#ifndef GUARD_HEADERNAME_H #define GUARD_HEADERNAME_H //This header code can be included more than once. #endif
5th Apr 2018, 12:52 PM
Timon Paßlick
+ 1
//In old code, bad code and rarely good code #define WILL_BE_REPLACED(args) code that uses args;
5th Apr 2018, 12:54 PM
Timon Paßlick
+ 1
#define WINDOWS #define NO_EXCEPTIONS
5th Apr 2018, 12:57 PM
Timon Paßlick
0
Because its permits to signal feautures (or feauture lacks) to compile-time when allow some custom automated compilation
4th Apr 2018, 2:59 PM
KrOW
KrOW - avatar