The second solution is to use the setup project and preprocessor directives.
Drugim rozwiązaniem jest użycie konfiguracji projektu oraz dyrektyw preprocesora.
Here's a short list of real-world applications where using a preprocessor is a life-saver.
Oto krótka lista rzeczywistych aplikacji, w których korzystanie z preprocesora to oszczędność.
It is simple to understand that the C++ preprocessor turns the line
To jest proste do zrozumienia, że preprocesor C ++ zamienia wiersz
Slow my preprocessor way down.
Instead, using a preprocessor, we can write the children selectors inside the parent's brackets.
Zamiast tego, używając preprocesora, możemy zapisać selektory dzieci w nawiasach rodzica.
This is one of the hyped up reasons to use a preprocessor and for a very good reason-it saves loads of time and tears.
Jest to jeden z powodów, dla których warto używać preprocesora z bardzo dobrego powodu - oszczędza mnóstwo czasu i łez.
It gets passed the manual source file, the preprocessor string, and optionally the device specified with -T or -E as arguments.
Dostaje on na wejście źródło strony podręcznika, łańcuch znaków preprocesora i opcjonalnie nazwę urządzenia podaną w argumentach opcji -T lub -E.
The -t option changes the preprocessor directives generated by yacc so that debugging statements will be incorporated in the compiled code.
Opcja -t zmienia dyrektywy preprocesora, generowane przez yacc tak, że do skompilowanego kodu zostaną załączone instrukcje debuggujące.
In addition, there are various other options for passing certain comma-separated options and arguments on to the assembler, preprocessor and linker, compile and assemble without linking, create a shared library, and many others.
Ponadto istnieje wiele innych opcji przekazywania pewnych opcji i argumentów oddzielonych przecinkami do asemblera, preprocesora i łącznika, kompilowania i składania bez łączenia, tworzenia współużytkowanej biblioteki i wielu innych.
If -p was not used and the environment variable was not set, the initial line of the nroff file is parsed for a preprocessor string.
Jeżeli nie podano -p, ani nie ustawiono zmiennej środowiska, to przetwarzana jest początkowa linia źródłowej strony nroff w poszukiwaniu poprawnego oznaczenia preprocesora.
The #include directive works by directing the C preprocessor to scan the specified file as input before continuing with the rest of the current source file.
include dyrektywa działa poprzez kierowanie preprocesora C do skanowania określonego pliku jako wejścia przed kontynuowaniem z resztą bieżącego pliku źródłowego.
C++03 provides two methods to test assertions: the macro assert and the preprocessor directive #error.
Starszy standard C++ posiada dwie metody do testowania asercji: makro assert i dyrektywa preprocesora #error.
One way to handle this is write conditional code, with code blocks selected by means of preprocessor directives (#ifdef); but because of the wide variety of build environments this approach quickly becomes unmanageable.
Jednym ze sposobów rozwiązania tego problemu jest pisanie kodu źródłowego z instrukcjami blokowymi wybieranymi przez dyrektywy preprocesora (#ifdef), jednak różnorodność narzędzi do kompilacji sprawia, że to podejście szybko staje się nieporęczne.