tagged [c-preprocessor]

Why is preprocessor usage less common in languages other than C/C++/ObjC?

Why is preprocessor usage less common in languages other than C/C++/ObjC? I've been a Java and VB.Net programmer for about 4 years and a C# programmer for about 6 months. I've also used a bunch of dyn...

12 Aug at 21:56

#DEBUG Preprocessor statements in ASPX page

#DEBUG Preprocessor statements in ASPX page I'm trying to use a preprocessor directive in an ASPX page, but the page doesn't recognize it. Is this just something I can't do? Background: I'm trying to ...

8 Jul at 19:14

Can visual studio automatically indent / format preprocessing directives?

Can visual studio automatically indent / format preprocessing directives? > [How to force indentation of C# conditional directives?](https://stackoverflow.com/questions/1321228/how-to-force-indentati...

Preprocessor check if multiple defines are not defined

Preprocessor check if multiple defines are not defined I have a selection of #defines in a header that are user editable and so I subsequently wish to check that the defines exist in case a user delet...

30 Nov at 12:4

How to redefine the names for the standard keywords in C#

How to redefine the names for the standard keywords in C# I have the interesting idea. I want to redefine the keywords in C#, like replace the `if` keyword to the `MyIf` or something else. Do someone ...

29 Nov at 18:36

Does C# Have Predefined Symbols?

Does C# Have Predefined Symbols? In C++ I have this: [http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx](http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx) . So I can write c...

28 Oct at 07:15

Preprocessor directives across different files in C#

Preprocessor directives across different files in C# I know that I can use preprocessor directives in `C#` to enable/disable compilation of some part of code. If I define a directive in the same file,...

Quote needed: Preprocessor usage is bad OO practice

Quote needed: Preprocessor usage is bad OO practice I believe, that the usage of preprocessor directives like `#if UsingNetwork` is bad OO practice - other coworkers do not. I think, when using an IoC...

8 Jul at 15:38

How to disable #line directives being written to the T4 generation output file

How to disable #line directives being written to the T4 generation output file I have encountered a small problem with my T4 code generation. I have broken my T4 templates up into separate files and p...

9 Jul at 19:32

Can I make a preprocessor directive dependent on the .NET framework version?

Can I make a preprocessor directive dependent on the .NET framework version? Here's a concrete example of what I want to do. Consider the `string.Join` function. Pre-.NET 4.0, there were only two over...

Error: invalid operands of types ‘const char [35]’ and ‘const char [2]’ to binary ‘operator+’

Error: invalid operands of types ‘const char [35]’ and ‘const char [2]’ to binary ‘operator+’ At the top of my file I have Later in the file I use ID multiple times including some lines that look like...

C# Preprocessor

C# Preprocessor While the C# spec does include a pre-processor and basic directives (#define, #if, etc), the language does not have the same flexible pre-processor found in languages such as C/C++. I ...

8 Jul at 13:17

How do I make a C++ macro behave like a function?

How do I make a C++ macro behave like a function? Let's say that for some reason you need to write a macro: `MACRO(X,Y)`. You want this macro to emulate a call to a function with no return value. ---...

23 May at 12:18

Combining C++ and C - how does #ifdef __cplusplus work?

Combining C++ and C - how does #ifdef __cplusplus work? I'm working on a project that has a lot of legacy code. We've started writing in C++, with the intent to eventually convert the legacy code, as ...

30 May at 06:8