Hi,
I'd like the following to appear in every source file in my Visual C++ 2005 solution:
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
Is there a way of doing this without manually copying it in? Compiler option?
Cheers
...
Hello,
I have a variable argument function which prints error messages in my application,whose code is given below.
void error(char *format,...)
{ va_list args;
printf("Error: ");
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
printf("\n");
abort();
}
This function error()is used in e...
I am not a programmer and have a very very limited knowledge about both VB coding and Java scripting.
I have a software which can be currently run through a Java script. The software does some caluculations and saves the result file in a folder.
I just want an example of Excel macros which could run this Java script, this way I wont have...
I'm finding the built-in Visual Studio Document Explorer less relevant, especially as more of the SDKs I work with have the most up-to-date content on-line. Pressing F1 starts Document Explorer usually with something unhelpful and it's not usable any more for me.
Is there any way that on the press of a key combination in Visual Studio:
...
I'm attempting to use a /D compiler option on MSVC6 to define a string, but there's something weird about using double quotes around it. To debug this problem, it would be extremely helpful for me to be able to see what value the preprocessor is actually substituting into my code where the macro is expanded. Is there any way I can do t...
This is very specific, and a bit difficult to explain, and quite likely impossible, but here goes. Perhaps some C cracks out there have an idea...
I want to implement <errno.h>. (My hobby project is implementing a Standard C library.)
The naive way to go about it is:
// in <errno.h>
extern int errno;
// in some .c file
int errno = 0;...
The documentation for MSVC's Predefined Macros state "_M_X64 [is] Defined for x64 processors." What does that mean, exactly? Will it be defined:
When I'm building for x64 processors, or
When I'm building with x64 processors?
Specifically, I'm looking for a compiler switch for the former case, not the latter. Will _M_X64 suffice for t...
I'm working on a project involving enlisting a large number of
relatively unskilled workers to do repetitive image analysis using
ImageJ. I've written a set of macros which walk them through the
analysis process, but in order to increase throughput and reduce
errors, I'd like to figure out how to hide as much of the gui/menu
interface as...
HI ,
Can some one help me in understanding why the value of SQUARE(x) is 49 ?
I am using Visual C++ 6.0 .
#define SQUARE(X) X * X
int main(int argc, char* argv[])
{
int y = 5;
printf("%d\n",SQUARE(++y));
return 0;
}
...
I'm trying to get a feel for the parts of Lisp that I haven't used very much up to now. Read macros have caught my attention at the moment. There isn't a huge amount of info about their use and it would help to see what people have done with them, both to get examples of how they work and also to see what sorts of problems can be approac...
Possible Duplicate:
What are C macros useful for?
Every few months I get an itch to go learn some bit of C that my crap college programming education never covered. Today it's macros. My basic understanding of macros is they're a simple search and replace that happens on your code prior to it being compiled. I'm having troubl...
What does the # symbol mean when used as a variable prefix in a #define macro?
For example,
#define my_setopt(x,y,z) _my_setopt(x, 0, config, #y, y, z)
...
I've some existing scripts wherein am using ftp + .netrc.
I want to switch to sftp now but it seems it doesn't support macros / .netrc.
Is there any other alternative?
Please help.
...
I just started using QT and noticed that all the example class definitions have the macro Q_OBJECT as the first line. What is the purpose of this preprocessor macro?
...
When learning C# for the first time, I was astonished that they had no support for macros in the same capacity that exists in C/C++. I realize that the #define keyword exists in C#, but it is greatly lacking compared to what I grew to love in C/C++. Does anyone know why real macros are missing from C#?
I apologize if this question is al...
In our project we have an excel template (.xlt) and an add-ins file (.xla). These files are used to create a dataview. Dataview is nothing but a kind of report. The xla contains code to create controls for creating, deleting, managing the dataview and its contents. These controls are OCX controls created in VC++ for creating the dataview...
I want to use some NSAssert stuff and other things to enable better debugging in my app. NSAssert wants a string which it prints if the assertion fails. Nice, but useless unless you type a whole bunch of information in that string, which can become a big mess when done all over the place.
So I want to make a macro that will do the NSAss...
Is there a way to specify in a solution file to load specific Macro project?
...
I'm writing a macro to let me replace the spaces in a string in my code file with underscores. I've gotten as far as finding the beginning and end of the string as instances of VirtualPoint. Now I'm trying to select from the first VirtualPoint to the second. And I can't figure it out.
I know the VirtualPoints are correct, because I'm...
I have a situation where I want to run a Visual Studio macro that has the user type something in an InputBox, then inserts a snippet and includes that text somewhere in it. Unfortunately, I can't figure out how to insert the snippet from macro code. It seems like it'd be something like
DTE.ExecuteCommand("Edit.InvokeSnippetFromShortcu...