Questions tagged as 'preprocessador'

1
answer

What does "\" mean in the C ++ header?

I was looking at the MFC header and I do not know what the "\" character means in this context: #define BEGIN_MESSAGE_MAP(theClass, baseClass) \ PTM_WARNING_DISABLE \     
asked by 28.09.2015 / 23:21
3
answers

How does the Include directive work?

Does "include" of C ++ do exactly what? I know it "imports" a header / library. But if I have a Header.h with: #include <string> using namespace std; string a() { return "PTSO"; } and in Main.cpp: #include <string> #include "H...
asked by 24.12.2014 / 11:31
1
answer

"#define" defines a global variable?

I have always used some define s, but now this question has arisen, when I use #define am I creating a global variable? Are there any losses in this usage? Example: Make program to read 10 numbers: I put% with% amount 10 and...
asked by 30.11.2018 / 22:52
1
answer

Why is the Stylus not identifying classes? [closed]

I have a problem with the Stylus. Compiling my code by Node sometimes gives a bug , it does not seem to identify the classes because of . generating the following error:    expected "indent", got "outdent" Note: There are hours th...
asked by 03.12.2015 / 14:03
1
answer

What are the advantages of using directives and macros?

Do policies and macros influence program performance?     
asked by 25.02.2016 / 22:30
1
answer

What is the use and when to use the preprocessor directives?

At some point I had seen the use of #define in C #. Today I searched about this and found its documentation here, but not answered all my doubts. Code sample with preprocessor directives: #define DEBUG #if DEBUG Console.Wr...
asked by 28.07.2017 / 17:23
1
answer

#if DEBUG always runs, even in release mode

I'm trying to use the #if directive so that a given method runs only after it is published (in release mode). The code is something like #if !DEBUG AlgumMetodo(); #endif I've also tried to add ConditionalAttribute to th...
asked by 27.01.2016 / 13:11
1
answer

In C / C ++, what are the build directives for? When should I use them?

I came across a C code that used a compilation directive in #ifdef and I do not quite understand what it's for. I found an explanation, but it was not clear. Here's an example policy and the explanation I looked for: #ifdef <token>...
asked by 04.10.2015 / 01:22
1
answer

Generate compilation error in C for not using a function

A problem arose in creating a mini-library to simulate Threads in a PIC. You would have to force the programmer to implement a function. I would like to know if there is any way to use the preprocessors inside functions and only call it if th...
asked by 20.07.2018 / 19:57
1
answer

Prepocessor (Less) - Variable @Arguments

Assuming I have the following mixin with following arguments: .font-style(@size: 1.2em, @style: 100, @leading:1.4em, @color: #efefed) Now I want to play this mixin passing the arguments that I define for a specific class. Ex: .myClass{ .f...
asked by 28.07.2015 / 19:01