-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Can you write preprocessor directives to return you a std::string or char*?
For example: In case of integers:
#define square(x) (x*x)
int main()
{
int x = square(5);
}
I'm looking to do the same but with strings like a switch-case pattern. if pass 1 it should return "One" and 2 for "Two" so…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I am using MinifyJS.tt which is a T4 template to minify all my JS files automatically.
In my aspx files, I am referencing all the javascript files.
Now, I want to add a condition (maybe compiler directive) to use the original JS file when I am debugging the application, and to use the minified JS…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
The only pre-process directive that I know about in VBScript / Classic ASP is the #include. I don't know if that is the official name but I'm basically looking for code that can execute code or other instructions before the general VBScript.
Are there any other such directives in VBScript? Such as…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Using the following pseudo-code:
#define BUILD_PATH "C:/MyBuild/"
#define BUILD_NAME "mydll.dll"
// Set build path here
representing how I would like to build the dll into C:/MyBuild/mydll.dll, how would I accomplish this by only using preprocessor directives?
Thanks a bunch!
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
If I wanted to add, let's say, a new .lib to the build only if a particular #define was set, how would I do that?
In the MSVC++ 2008 "Property Pages", you would simply add: Config Properties -> Linker -> Input -> Additional Dependencies, but I would like it if something like #define COMPILE_WITH_DETOURS…
>>> More