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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. what does these lines mean??

what does these lines mean??

Scheduled Pinned Locked Moved C / C++ / MFC
question
11 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.
  • A AmbiguousName

    hello guys... what does these three lines of code mean...thnx

    #if _MSC_VER > 1000
    #pragma once
    #endif

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

    #pragma once is an include guard: the file will be included only once. This is similar has having the text in the file wrapped into a

    #ifndef .....
    #define

    #endif

    section. I think this pragma was not available in the first versions of the compiler (_MSC_VER), that is why it is wrapped into the #if/#endif section.

    Cédric Moonen Software developer
    Charting control [v3.0] OpenGL game tutorial in C++

    A 1 Reply Last reply
    0
    • C Cedric Moonen

      #pragma once is an include guard: the file will be included only once. This is similar has having the text in the file wrapped into a

      #ifndef .....
      #define

      #endif

      section. I think this pragma was not available in the first versions of the compiler (_MSC_VER), that is why it is wrapped into the #if/#endif section.

      Cédric Moonen Software developer
      Charting control [v3.0] OpenGL game tutorial in C++

      A Offline
      A Offline
      AmbiguousName
      wrote on last edited by
      #3

      and what is this??

      _MSC_VER > 1000

      C L CPalliniC 3 Replies Last reply
      0
      • A AmbiguousName

        and what is this??

        _MSC_VER > 1000

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

        If the compiler version is higher than version 10 (not sure, you have to google to see how the versions are encoded), then the pragma is used.

        Cédric Moonen Software developer
        Charting control [v3.0] OpenGL game tutorial in C++

        1 Reply Last reply
        0
        • A AmbiguousName

          and what is this??

          _MSC_VER > 1000

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #5

          functionality gets added to windows all the time, and data structures sometimes get expanded. To cope with these, Microsoft has one overall version number in _MSC_VER, which they use to have their header files adapt to the situation. Example: since Vista, the LVITEM struct has some new fields. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

          1 Reply Last reply
          0
          • A AmbiguousName

            and what is this??

            _MSC_VER > 1000

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #6

            They hide it inside the documentation. --Led Mike

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            In testa che avete, signor di Ceprano?

            N C E 3 Replies Last reply
            0
            • CPalliniC CPallini

              They hide it inside the documentation. --Led Mike

              If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
              This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
              [My articles]

              N Offline
              N Offline
              Niklas L
              wrote on last edited by
              #7

              CPallini wrote:

              They hide it inside the documentation.

              Bastards!

              home

              V 1 Reply Last reply
              0
              • CPalliniC CPallini

                They hide it inside the documentation. --Led Mike

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

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

                :-D BTW, it's been a very long time I didn't see him !

                Cédric Moonen Software developer
                Charting control [v3.0] OpenGL game tutorial in C++

                CPalliniC 1 Reply Last reply
                0
                • C Cedric Moonen

                  :-D BTW, it's been a very long time I didn't see him !

                  Cédric Moonen Software developer
                  Charting control [v3.0] OpenGL game tutorial in C++

                  CPalliniC Offline
                  CPalliniC Offline
                  CPallini
                  wrote on last edited by
                  #9

                  Sadly he left because of 'HOW TO ANSWER A QUESTION', see his profile page. :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  In testa che avete, signor di Ceprano?

                  1 Reply Last reply
                  0
                  • CPalliniC CPallini

                    They hide it inside the documentation. --Led Mike

                    If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                    This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                    [My articles]

                    E Offline
                    E Offline
                    Eytukan
                    wrote on last edited by
                    #10

                    :-D

                    Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

                    1 Reply Last reply
                    0
                    • N Niklas L

                      CPallini wrote:

                      They hide it inside the documentation.

                      Bastards!

                      home

                      V Offline
                      V Offline
                      vinoth8187
                      wrote on last edited by
                      #11

                      :wtf: who boss...... ayyo ayyo yo:-D

                      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