Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6742621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:51:55+00:00 2026-05-26T11:51:55+00:00

Visual C++ features #pragma warning that among other things allows to change the warning

  • 0

Visual C++ features #pragma warning that among other things allows to change the warning level of a specific warning. Say warning X has level 4 by default, then after

#pragma warning( 3, X )

it will have level 3 from that point.

I understand why I would temporarily disable a warning, turn a warning into an error or turn on a waring that is off by default. But why would I change a warning level?

I mean warning level of a specific warning works together with the compiler “warning level” option /W, so I currently can’t imagine a setup in which I would want to change a level of an individual warning since the warning being emitted or not will depend on the project settings.

What are real-life examples of when I really need to change a warning level of a specific warning in C++?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:51:56+00:00Added an answer on May 26, 2026 at 11:51 am

    When you want to run on level 3 or 4, but you want to see/not see a specific message, you can change its level. Sure, the pragma might have no effect if the warning level isn’t what you think, but that’s life with pragmas.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Visual Studio has designer for editing the definition of SharePoint features. There is also
I have Visual Studio 2010 Ultimate installed. It includes a lot of features that
When you're using Visual Studio refactoring features you may change the name of variable
I am trying to learn some of the basic and advanced features of visual
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Is there anyway to disable the rather annoying feature that Visual Studio (2008 in
Similar Post: Hidden Features of Visual Studio (2005-2008)? What are some shortcut keys you
I am testing out the new database project features of Visual Studio 2010 and
Is Navigate to one of the missing features from Visual Studio Express 2010?
Is it possible to use the new taskbar Windows 7 features in Visual Studio

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.