CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Join Date
    May 2007
    Posts
    811

    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.

  2. #17
    Join Date
    Nov 2006
    Location
    Australia
    Posts
    1,569

    Re: Defining a macro to disable warnings with pragma

    Quote Originally Posted by Amleto View Post
    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 View Post
    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. I'd still prefer the header file over doing it the comment way.
    Good judgment is gained from experience. Experience is gained from bad judgment.
    Cosy Little Game | SDL | GM script | VLD | Syntax Hlt | Can you help me with my homework assignment?

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured