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. The Lounge
  3. Start Prepping Your Code

Start Prepping Your Code

Scheduled Pinned Locked Moved The Lounge
htmlcomquestion
14 Posts 8 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
    basementman
    wrote on last edited by
    #1

    Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64  onwards and upwards...

    J B M C 4 Replies Last reply
    0
    • B basementman

      Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64  onwards and upwards...

      J Offline
      J Offline
      John M Drescher
      wrote on last edited by
      #2

      :sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John

      B E C 3 Replies Last reply
      0
      • J John M Drescher

        :sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John

        B Offline
        B Offline
        basementman
        wrote on last edited by
        #3

        Yes, I still use VC6 mostly because there is no compelling reason for me to move to VC.Net. The IDE is much more bloated and sluggish, and I develop mostly server-side stuff now, so the forms designers are of no value. I still use a 650Mhz PIII Celeron laptop, running SQL Server, IIS and my web apps. I figure if it performs well on my laptop, there should be no problems when I upload the code to the production farm of gear that is very high end. However, we do maintain and support our Web C++ App server product for VC.NET targets as well, so I do need to keep up on these changes.  onwards and upwards...

        1 Reply Last reply
        0
        • J John M Drescher

          :sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John

          E Offline
          E Offline
          El Corazon
          wrote on last edited by
          #4

          We are barely starting our port now to a .Net environment. We are stuck on VC6 because a major core 3rd party library was based on the STL of VC6 and is incompatible with .Net. We've had to decide on and replace that library to start moving forward. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

          C 1 Reply Last reply
          0
          • B basementman

            Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64  onwards and upwards...

            B Offline
            B Offline
            Bamaco2
            wrote on last edited by
            #5

            Stuck on VC6 because older libraries just work with that version. We will have to pay some cold hard cash to get a supported version recent enough to work on the newer stuff. If it were only for my own code, I could live with the sluggishness of the newer IDE, or at least beg for a PC upgrade. I still hope for upgraded libraries and compiler, whenever it makes sense.

            1 Reply Last reply
            0
            • B basementman

              Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64  onwards and upwards...

              M Offline
              M Offline
              Mike Dimmick
              wrote on last edited by
              #6

              1. You can use /Zc:forScope- or #pragma conform(forScope, off) to turn this feature off. 2. You can define _USE_32BIT_TIME_T to use a 32-bit time_t. Both pieces of information based on the documentation currently on Visual Studio 2005 Developer Centre[^]. Stability. What an interesting concept. -- Chris Maunder

              1 Reply Last reply
              0
              • B basementman

                Coming Changes in VC2005[^] Might as well start preparing....I think the biggest change will be in two areas: 1) Scoping of variables declared in for loops 2) time_t size changing from long to _int64  onwards and upwards...

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                Prepping is only required for people who didn't write proper C++ in the first place. Knowing that VC6 was not standards compliant, I always wrote loops like this: int i = 0; for (; i < 100; ++i) so that my code would compile on VC, and on a standards compliant compiler. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                C 1 Reply Last reply
                0
                • J John M Drescher

                  :sigh: I'm still stuck on VC6, because too much of my code was broken by vc.net... John

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  Not wanting to be rude, but you should have paid more attention to the language and less to the compiler. In all the programs I wrote, only one line of code needed changing from VC6 to VC7, and that was something that I'd known at the time was wrong, but I thought that dereferencing an iterator and then getting the address of the returned value looked dumb ( at the time ). Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                  A J 2 Replies Last reply
                  0
                  • E El Corazon

                    We are barely starting our port now to a .Net environment. We are stuck on VC6 because a major core 3rd party library was based on the STL of VC6 and is incompatible with .Net. We've had to decide on and replace that library to start moving forward. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #9

                    If your third party library NEEDED the broken STL that came with VC6, you're better off without it. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                    E 1 Reply Last reply
                    0
                    • C Christian Graus

                      Prepping is only required for people who didn't write proper C++ in the first place. Knowing that VC6 was not standards compliant, I always wrote loops like this: int i = 0; for (; i < 100; ++i) so that my code would compile on VC, and on a standards compliant compiler. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                      C Offline
                      C Offline
                      cmk
                      wrote on last edited by
                      #10

                      It's not that it isn't compliant to write:

                      for( int i = 0; i < j; i++ ) {
                      statement
                      }

                      It's that the scope of i only extends (according to the ARM r.6.5.3) to the end of the for statement. Most people have coded such that they continue to use i after the for block, at which point it should be out of scope. This is where they are going to have trouble. ...cmk Save the whales - collect the whole set

                      C 1 Reply Last reply
                      0
                      • C Christian Graus

                        Not wanting to be rude, but you should have paid more attention to the language and less to the compiler. In all the programs I wrote, only one line of code needed changing from VC6 to VC7, and that was something that I'd known at the time was wrong, but I thought that dereferencing an iterator and then getting the address of the returned value looked dumb ( at the time ). Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                        A Offline
                        A Offline
                        Anna Jayne Metcalfe
                        wrote on last edited by
                        #11

                        Most of the porting issues I've seen have been down to either code that hasn't been scanned for warnings thoroughly (a strict Lint warning policy can help here, but many shops seem to not even progress to warning level 4) or to problems arising from changed behaviour in frameworks. One company I know has a big issue with the runtime class/dynamic object creation behaviour in MFC 7 (sufficient to have an open incident with MS on the subject) but such issues are generally the last ones found - and the most intractable. At the end of the day porting and validating a 1 million line project is no fun whichever way you look at it. :~ Anna :rose: Riverblade Ltd - Software Consultancy Services Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.

                        1 Reply Last reply
                        0
                        • C cmk

                          It's not that it isn't compliant to write:

                          for( int i = 0; i < j; i++ ) {
                          statement
                          }

                          It's that the scope of i only extends (according to the ARM r.6.5.3) to the end of the for statement. Most people have coded such that they continue to use i after the for block, at which point it should be out of scope. This is where they are going to have trouble. ...cmk Save the whales - collect the whole set

                          C Offline
                          C Offline
                          Christian Graus
                          wrote on last edited by
                          #12

                          yeah, so.... if you write it my way, it's both compliant, and will work AS EXPECTED in VC6. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                          1 Reply Last reply
                          0
                          • C Christian Graus

                            Not wanting to be rude, but you should have paid more attention to the language and less to the compiler. In all the programs I wrote, only one line of code needed changing from VC6 to VC7, and that was something that I'd known at the time was wrong, but I thought that dereferencing an iterator and then getting the address of the returned value looked dumb ( at the time ). Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                            J Offline
                            J Offline
                            John M Drescher
                            wrote on last edited by
                            #13

                            Most of the problems I have had was not with my code but with code I have used from codeproject and other places (codeguru being one of them). There is at least 75K lines of this code in use in my applications and after two weeks of trying port this code I gave up. This was about two years ago and at the time none of the articles were updated to support VC7. Maybe by now enough of them are fixed that the problem will not be as time consuming the only thing is that I have no time to spend on this for the next 3 months... John

                            1 Reply Last reply
                            0
                            • C Christian Graus

                              If your third party library NEEDED the broken STL that came with VC6, you're better off without it. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

                              E Offline
                              E Offline
                              El Corazon
                              wrote on last edited by
                              #14

                              Oh believe me!! I have no regrets in dropping it. It's just troublesome porting to a new one, but we will gain OS portibility and license free development in the new move. :) _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                              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