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. Other Discussions
  3. The Weird and The Wonderful
  4. A backslash in C++

A backslash in C++

Scheduled Pinned Locked Moved The Weird and The Wonderful
c++help
41 Posts 17 Posters 1 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.
  • P Pete OHanlon

    Hey, I like vi. There are parts of it that I wish were available in Visual Studio. dd for instance. Or 10dd to delete 10 lines. Yes, you can do this using other means in an IDE, but they are all more cumbersome.

    S Offline
    S Offline
    Sentenryu
    wrote on last edited by
    #15

    I just can't get myself to tolerate vi, maybe because my only contact with it was on a old debian distro on my SO class, but the ammount of work needed to edit a simple 2 line key:value file threw me off.

    P 1 Reply Last reply
    0
    • S Sentenryu

      I just can't get myself to tolerate vi, maybe because my only contact with it was on a old debian distro on my SO class, but the ammount of work needed to edit a simple 2 line key:value file threw me off.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #16

      I started off my professional programming career using vi as my editor. Ah, for the days of :wq.

      S C 2 Replies Last reply
      0
      • P Pete OHanlon

        I started off my professional programming career using vi as my editor. Ah, for the days of :wq.

        S Offline
        S Offline
        Sentenryu
        wrote on last edited by
        #17

        that really sounds like pain, but it's painfull to deal with IDE bugs and slowdowns too, so maybe you're right :^)

        P 1 Reply Last reply
        0
        • S Sentenryu

          that really sounds like pain, but it's painfull to deal with IDE bugs and slowdowns too, so maybe you're right :^)

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #18

          We didn't have IDE's on Unix systems when I started. I'm, what's the word I'm looking for? Oh yes, I'm old.

          N S 2 Replies Last reply
          0
          • T Tsuda Kageyu

            My co-worker was struggling with a bug in an old C++ program.

            // Sometimes carry out the work \
            if (flag) {
            SomeWork();
            }

            SomeWork() was called regardless of the value of flag. It took her a few hours to find a backslash at the end of the comment.

            P Offline
            P Offline
            Pablo Aliskevicius
            wrote on last edited by
            #19

            The compilers I've used give a warning in cases like this. JM2B,

            Pablo. "Accident: An inevitable occurrence due to the action of immutable natural laws." (Ambrose Bierce, circa 1899). "You are to act in the light of experience as guided by intelligence" (Rex Stout, "In the Best Families", 1950).

            S 1 Reply Last reply
            0
            • P Pete OHanlon

              I started off my professional programming career using vi as my editor. Ah, for the days of :wq.

              C Offline
              C Offline
              Chris Quinn
              wrote on last edited by
              #20

              A good while ago I worked in a department where we did software development on both MSDos and Unix boxes. On the Dos boxes we used a realy good text editor called MultiEdit. One developer asked if I could get him MultiEdit for Unix - I replied no, but said that I couod get him vi for Dos - he nearly punched me!

              ========================================================= I'm an optoholic - my glass is always half full of vodka. =========================================================

              1 Reply Last reply
              0
              • P Pete OHanlon

                We didn't have IDE's on Unix systems when I started. I'm, what's the word I'm looking for? Oh yes, I'm old.

                N Offline
                N Offline
                Nagy Vilmos
                wrote on last edited by
                #21

                Yup, no argument from here. BTW, IIRC in vi you can write and exit with only three key strokes - [ESC]ZZ - rather than the cumbersome five of [ESC]:wq[ENTER].

                speramus in juniperus

                1 Reply Last reply
                0
                • A Argonia

                  If you are programmer with not enough background with the language i don't thing that the best practice is to disable the coloring of the text. I think that the language itself it is not so easy to do such practice. And beside that coloring can save you hours of debugging in some cases like this for example. A enough experienced c++ / colorblind programmer can disable the coloring without lowering his or hers productivity.

                  Microsoft ... the only place where VARIANT_TRUE != true

                  N Offline
                  N Offline
                  Nagy Vilmos
                  wrote on last edited by
                  #22

                  When you become practised in the art then you simply hold your hands above the keyboard in supplication and the code writes itself out of fear of reprisals. :cool:

                  speramus in juniperus

                  A C 2 Replies Last reply
                  0
                  • N Nagy Vilmos

                    When you become practised in the art then you simply hold your hands above the keyboard in supplication and the code writes itself out of fear of reprisals. :cool:

                    speramus in juniperus

                    A Offline
                    A Offline
                    Argonia
                    wrote on last edited by
                    #23

                    I can only dream of achieving such heights. :sigh:

                    Microsoft ... the only place where VARIANT_TRUE != true

                    1 Reply Last reply
                    0
                    • P Pete OHanlon

                      We didn't have IDE's on Unix systems when I started. I'm, what's the word I'm looking for? Oh yes, I'm old.

                      S Offline
                      S Offline
                      Sentenryu
                      wrote on last edited by
                      #24

                      Well, I'm young and I run away from unix, so there's that :laugh:

                      1 Reply Last reply
                      0
                      • P Pablo Aliskevicius

                        The compilers I've used give a warning in cases like this. JM2B,

                        Pablo. "Accident: An inevitable occurrence due to the action of immutable natural laws." (Ambrose Bierce, circa 1899). "You are to act in the light of experience as guided by intelligence" (Rex Stout, "In the Best Families", 1950).

                        S Offline
                        S Offline
                        Sentenryu
                        wrote on last edited by
                        #25

                        Who looks at warnings? nobody that works with me, sadly :(

                        OriginalGriffO 1 Reply Last reply
                        0
                        • S Sentenryu

                          Who looks at warnings? nobody that works with me, sadly :(

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #26

                          I don't - I have "treat warnings as errors" set on my projects to prevent compilation succeeding! :laugh:

                          Never underestimate the power of stupid things in large numbers --- Serious Sam

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          S L 3 Replies Last reply
                          0
                          • T Tsuda Kageyu

                            Oops! It was like this:

                            // Sometimes carry out the work \
                            if (flag)
                            {
                            SomeWork();
                            }

                            N Offline
                            N Offline
                            Nicholas Marty
                            wrote on last edited by
                            #27

                            That's a reason more to use K&R style (or a variation of it)!! :laugh:

                            1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              I don't - I have "treat warnings as errors" set on my projects to prevent compilation succeeding! :laugh:

                              Never underestimate the power of stupid things in large numbers --- Serious Sam

                              S Offline
                              S Offline
                              Sentenryu
                              wrote on last edited by
                              #28

                              People here don't read error messages, so even if i set that they would just ignore

                              OriginalGriffO 1 Reply Last reply
                              0
                              • OriginalGriffO OriginalGriff

                                I don't - I have "treat warnings as errors" set on my projects to prevent compilation succeeding! :laugh:

                                Never underestimate the power of stupid things in large numbers --- Serious Sam

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #29

                                Many programmers use "treat errors as warnings" option.

                                1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  I don't - I have "treat warnings as errors" set on my projects to prevent compilation succeeding! :laugh:

                                  Never underestimate the power of stupid things in large numbers --- Serious Sam

                                  L Offline
                                  L Offline
                                  Lost User
                                  wrote on last edited by
                                  #30

                                  Many programmers use "treat errors as warnings" flag.

                                  R 1 Reply Last reply
                                  0
                                  • S Sentenryu

                                    People here don't read error messages, so even if i set that they would just ignore

                                    OriginalGriffO Offline
                                    OriginalGriffO Offline
                                    OriginalGriff
                                    wrote on last edited by
                                    #31

                                    That's the whole point: if you set "treat warnings as errors" then compilation fails until the warning is fixed. You can't run or test you app until you do.

                                    Never underestimate the power of stupid things in large numbers --- Serious Sam

                                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                    F 1 Reply Last reply
                                    0
                                    • P Pete OHanlon

                                      And what about those hard core devs who swear by (instead of at) vi? My point wasn't that Notepad++ supports or does not support colourisation. It's that you can't rely on colourisation to indicate problems.

                                      C Offline
                                      C Offline
                                      CPallini
                                      wrote on last edited by
                                      #32

                                      Hey man, hats off to vi: it provides syntax colouring as well. And you can rely on colourization. Well, unless you write something like

                                      for (n=0; n<100; ++n);
                                      {
                                      doSomething();
                                      }

                                      Veni, vidi, vici.

                                      1 Reply Last reply
                                      0
                                      • N Nagy Vilmos

                                        When you become practised in the art then you simply hold your hands above the keyboard in supplication and the code writes itself out of fear of reprisals. :cool:

                                        speramus in juniperus

                                        C Offline
                                        C Offline
                                        CPallini
                                        wrote on last edited by
                                        #33

                                        Yes, we do know PMs have a quite twisted perception of the software development process. ;P

                                        Veni, vidi, vici.

                                        1 Reply Last reply
                                        0
                                        • P Pete OHanlon

                                          Hey, I like vi. There are parts of it that I wish were available in Visual Studio. dd for instance. Or 10dd to delete 10 lines. Yes, you can do this using other means in an IDE, but they are all more cumbersome.

                                          B Offline
                                          B Offline
                                          Brisingr Aerowing
                                          wrote on last edited by
                                          #34

                                          VsVim[^] might be useful for you. It adds Vim commands to VS.

                                          Getting information off the Internet is like taking a drink from a fire hydrant. - Mitchell Kapor

                                          L 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