Re: Defining a macro to disable warnings with pragma
I would ask what are you gaining here by using macro. You just obscure it and maybe save one line of typing code.
If you forget the syntax for it which happens also to me , I just have pasted in one of my header files in a comment block, and then just copy and paste when I needed.
Re: Defining a macro to disable warnings with pragma
Quote:
Originally Posted by
Amleto
Excellent! How did you find that? I searched for terms like "macro expansion pragma" etc., but came up with nothing...
I think including a header file is the next best option, though I'm curious if there are any disadvantages that I should be aware of..
Quote:
Originally Posted by
STLDude
I would ask what are you gaining here by using macro. You just obscure it and maybe save one line of typing code.
If you forget the syntax for it which happens also to me , I just have pasted in one of my header files in a comment block, and then just copy and paste when I needed.
I'm not gaining much, true.. but it just so happens that I prefer typing 2 lines than 3. :rolleyes: I'd still prefer the header file over doing it the comment way.