Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Disable warning [modified]

Disable warning [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
7 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    big_denny_200
    wrote on last edited by
    #1

    Hi all :) I have a VS2005 MSC project, consisting of many classes, but when I compile I get many warnings(in different .cpp files) of type : warning C4996: wcscpy was declared depreciated c:\....cpp How to disable this warning, for whole project ? thank you. -- modified at 7:52 Wednesday 31st May, 2006

    C N M J E 5 Replies Last reply
    0
    • B big_denny_200

      Hi all :) I have a VS2005 MSC project, consisting of many classes, but when I compile I get many warnings(in different .cpp files) of type : warning C4996: wcscpy was declared depreciated c:\....cpp How to disable this warning, for whole project ? thank you. -- modified at 7:52 Wednesday 31st May, 2006

      N Offline
      N Offline
      NiceNaidu fo
      wrote on last edited by
      #2

      Use #pragma to enable or disable the warnings. Chk this http://msdn2.microsoft.com/en-us/library/zyhb0b82.aspx[^] Appu.. "If you judge people, you have no time to love them."

      1 Reply Last reply
      0
      • B big_denny_200

        Hi all :) I have a VS2005 MSC project, consisting of many classes, but when I compile I get many warnings(in different .cpp files) of type : warning C4996: wcscpy was declared depreciated c:\....cpp How to disable this warning, for whole project ? thank you. -- modified at 7:52 Wednesday 31st May, 2006

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        In your stdafx.h file, add the following line:

        #pragma warning( disable : 4996 )


        Cédric Moonen Software developer
        Charting control

        1 Reply Last reply
        0
        • B big_denny_200

          Hi all :) I have a VS2005 MSC project, consisting of many classes, but when I compile I get many warnings(in different .cpp files) of type : warning C4996: wcscpy was declared depreciated c:\....cpp How to disable this warning, for whole project ? thank you. -- modified at 7:52 Wednesday 31st May, 2006

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          #pragma warning(disable:4100)

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          1 Reply Last reply
          0
          • B big_denny_200

            Hi all :) I have a VS2005 MSC project, consisting of many classes, but when I compile I get many warnings(in different .cpp files) of type : warning C4996: wcscpy was declared depreciated c:\....cpp How to disable this warning, for whole project ? thank you. -- modified at 7:52 Wednesday 31st May, 2006

            J Offline
            J Offline
            James R Twine
            wrote on last edited by
            #5

            By using its replacement...? :)    Peace! -=- James


            If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
            Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
            DeleteFXPFiles & CheckFavorites (Please rate this post!)

            1 Reply Last reply
            0
            • B big_denny_200

              Hi all :) I have a VS2005 MSC project, consisting of many classes, but when I compile I get many warnings(in different .cpp files) of type : warning C4996: wcscpy was declared depreciated c:\....cpp How to disable this warning, for whole project ? thank you. -- modified at 7:52 Wednesday 31st May, 2006

              E Offline
              E Offline
              echozeng
              wrote on last edited by
              #6

              it is so easy question,i am very glad to answer it add "#pragma warning(disabled:4996)" in the head of header file and then the warning informaion will disappear. echozeng ----->rose rose i love you

              T 1 Reply Last reply
              0
              • E echozeng

                it is so easy question,i am very glad to answer it add "#pragma warning(disabled:4996)" in the head of header file and then the warning informaion will disappear. echozeng ----->rose rose i love you

                T Offline
                T Offline
                toxcct
                wrote on last edited by
                #7

                i'm not going to blame you because (and only because) you're new to this forum. BTW, you should avoid posting an answer if it has already been answered (especially if you don't provide much useful infos)... the #pragma solution was even quoted more than twice already, so read the other answers before replying ;)


                TOXCCT >>> GEII power

                [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups