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. Really frustrated when moving from C# to C++

Really frustrated when moving from C# to C++

Scheduled Pinned Locked Moved The Lounge
csharpc++
88 Posts 42 Posters 2 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.
  • J jpg 0

    Mostly because of how pointers and references work, and also function definition seems very different. :((

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

    On the other hand, you should find moving to VB refreshing... :rolleyes:

    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]

    R OriginalGriffO 2 Replies Last reply
    0
    • M Mladen Jankovic

      .jpg wrote:

      Mostly because of how pointers and references work

      It's a one thing that distinguish boys and real men.

      [Genetic Algorithm Library]

      J Offline
      J Offline
      jpg 0
      wrote on last edited by
      #4

      Saying this makes you feel better?

      K M 2 Replies Last reply
      0
      • C CPallini

        On the other hand, you should find moving to VB refreshing... :rolleyes:

        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]

        R Offline
        R Offline
        Rama Krishna Vavilala
        wrote on last edited by
        #5

        Lol:) Yes.:thumbsup:

        1 Reply Last reply
        0
        • J jpg 0

          Saying this makes you feel better?

          K Offline
          K Offline
          Keith Barrow
          wrote on last edited by
          #6

          There are two ways to look at this, either: a) once you have figured out how pointers and referencing works (in which case you'll be a "man") --or-- b) you just give up as it is too complicated There is a very real difference between groups a & b. The people who write .net understand this stuff, they handle it for you (for the most part). If you have any interest in your craft, it will be good to get to grips with this stuff. When the penny dropped for me (back when I was at uni) it was like a moment of zen enlightenment, it tied together several parts of disparate courses: it bridged the gap between chip design & assembler and the higher level stuff we'd been doing elswhere. Although I found it interesting for its own sake, I still find this stuff useful ten years on. It makes learning new langauages easier for one thing.

          Sort of a cross between Lawrence of Arabia and Dilbert.[^]
          -Or-
          A Dead ringer for Kate Winslett[^]

          _ L M 3 Replies Last reply
          0
          • J jpg 0

            Mostly because of how pointers and references work, and also function definition seems very different. :((

            Steve EcholsS Offline
            Steve EcholsS Offline
            Steve Echols
            wrote on last edited by
            #7

            You're really gonna miss the String class. :)


            - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

            • S
              50 cups of coffee and you know it's on!
              Code, follow, or get out of the way.
            B P P 3 Replies Last reply
            0
            • J jpg 0

              Mostly because of how pointers and references work, and also function definition seems very different. :((

              B Offline
              B Offline
              bob16972
              wrote on last edited by
              #8

              I feel the same way about C++ to C#. I've found you still need to check for null just as often and C#, without the .NET library (libraries are really a different topic...IMHO), is hardly the C++ 2.0 most C/C++ programmers had been longing for. I would like a reinvented C/C++ without all the historical baggage but I'd like to keep pointers and references the way they are. I had high hopes for C# but I think they missed a great opportunity to "fix" what was wrong with C/C++ and instead ended up trying to "fix" what was wrong with Java.

              C S S 3 Replies Last reply
              0
              • K Keith Barrow

                There are two ways to look at this, either: a) once you have figured out how pointers and referencing works (in which case you'll be a "man") --or-- b) you just give up as it is too complicated There is a very real difference between groups a & b. The people who write .net understand this stuff, they handle it for you (for the most part). If you have any interest in your craft, it will be good to get to grips with this stuff. When the penny dropped for me (back when I was at uni) it was like a moment of zen enlightenment, it tied together several parts of disparate courses: it bridged the gap between chip design & assembler and the higher level stuff we'd been doing elswhere. Although I found it interesting for its own sake, I still find this stuff useful ten years on. It makes learning new langauages easier for one thing.

                Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                -Or-
                A Dead ringer for Kate Winslett[^]

                _ Offline
                _ Offline
                _beauw_
                wrote on last edited by
                #9

                My observation is that people who discount the importance of knowing how things really work (i.e. how things work in the absence of an unseen, out-of-thread garbage collector) tend to be people who look at everything from a very PC-centered perspective. On a PC, or anything resembling a PC, it probably does not make sense for application code to need to do anything special just to effect proper garbage collection. But a real computer scientist, or even a reasonably good (i.e. versatile) programmer, should realize that not everything is a PC, and that there is value to being able to run things on devices that are not PCs (e.g. microcontrollers retailing for $2). This is just one of a whole family of spurious, PC-centric arguments I see on the Internet, which has, after all, become a network largely comprised of PCs. Statements like "every application should have logging" or "every application should be OO" fall into the same category. Such assertions really seem nonsensical if one considers the code that runs inside of digital wristwatches, DVD drive controllers, and such.

                K L 2 Replies Last reply
                0
                • Steve EcholsS Steve Echols

                  You're really gonna miss the String class. :)


                  - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

                  B Offline
                  B Offline
                  bob16972
                  wrote on last edited by
                  #10

                  I think the ATL/MFC CString will prove to be adequate. I've found when comparing the pros and cons of each, they tend to balance out. That's one of the few areas I truly believe there is a tie.

                  Steve EcholsS C 2 Replies Last reply
                  0
                  • K Keith Barrow

                    There are two ways to look at this, either: a) once you have figured out how pointers and referencing works (in which case you'll be a "man") --or-- b) you just give up as it is too complicated There is a very real difference between groups a & b. The people who write .net understand this stuff, they handle it for you (for the most part). If you have any interest in your craft, it will be good to get to grips with this stuff. When the penny dropped for me (back when I was at uni) it was like a moment of zen enlightenment, it tied together several parts of disparate courses: it bridged the gap between chip design & assembler and the higher level stuff we'd been doing elswhere. Although I found it interesting for its own sake, I still find this stuff useful ten years on. It makes learning new langauages easier for one thing.

                    Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                    -Or-
                    A Dead ringer for Kate Winslett[^]

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

                    And even worse, pointers do exist in C# and work very much the same way.

                    "I just exchanged opinions with my boss. I went in with mine and came out with his." - me, 2011 ---
                    I am endeavoring, Madam, to construct a mnemonic memory circuit using stone knives and bearskins - Mr. Spock 1935 and me 2011

                    J S 2 Replies Last reply
                    0
                    • J jpg 0

                      Mostly because of how pointers and references work, and also function definition seems very different. :((

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

                      I've just moved to Python - you can't even tell a thread to terminate or pass variables by reference!

                      Join the cool kids - Come fold with us[^] "Program as if the technical support department is full of serial killers and they know your home address" - Ray Cassick Jr., RIP

                      C P R 3 Replies Last reply
                      0
                      • B bob16972

                        I think the ATL/MFC CString will prove to be adequate. I've found when comparing the pros and cons of each, they tend to balance out. That's one of the few areas I truly believe there is a tie.

                        Steve EcholsS Offline
                        Steve EcholsS Offline
                        Steve Echols
                        wrote on last edited by
                        #13

                        Yeah, they should get the job done, especially if it's a self contained app. It's when you start getting into com and win api, is when it can get weird with all the variations and unicode, etc. Been awhile since I've done it, but remember all the conversions could get confusing.


                        - S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.

                        • S
                          50 cups of coffee and you know it's on!
                          Code, follow, or get out of the way.
                        1 Reply Last reply
                        0
                        • C CPallini

                          On the other hand, you should find moving to VB refreshing... :rolleyes:

                          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]

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

                          CPallini wrote:

                          you should find moving to VB refreshing...

                          ...the parts other programming languages don't want to go anywhere near?

                          Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

                          "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

                          C 1 Reply Last reply
                          0
                          • B bob16972

                            I think the ATL/MFC CString will prove to be adequate. I've found when comparing the pros and cons of each, they tend to balance out. That's one of the few areas I truly believe there is a tie.

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

                            Real programmers don't use CStrings. In fact real programmers don't use strings at all. :-\

                            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]

                            P S 2 Replies Last reply
                            0
                            • J jpg 0

                              Mostly because of how pointers and references work, and also function definition seems very different. :((

                              R Offline
                              R Offline
                              Rajesh R Subramanian
                              wrote on last edited by
                              #16

                              C# to C++?! You shouldn't expect that move to be easy, and you should in fact be happy that you were not moving to C.

                              "Real men drive manual transmission" - Rajesh.

                              C 1 Reply Last reply
                              0
                              • _ _beauw_

                                My observation is that people who discount the importance of knowing how things really work (i.e. how things work in the absence of an unseen, out-of-thread garbage collector) tend to be people who look at everything from a very PC-centered perspective. On a PC, or anything resembling a PC, it probably does not make sense for application code to need to do anything special just to effect proper garbage collection. But a real computer scientist, or even a reasonably good (i.e. versatile) programmer, should realize that not everything is a PC, and that there is value to being able to run things on devices that are not PCs (e.g. microcontrollers retailing for $2). This is just one of a whole family of spurious, PC-centric arguments I see on the Internet, which has, after all, become a network largely comprised of PCs. Statements like "every application should have logging" or "every application should be OO" fall into the same category. Such assertions really seem nonsensical if one considers the code that runs inside of digital wristwatches, DVD drive controllers, and such.

                                K Offline
                                K Offline
                                Keith Barrow
                                wrote on last edited by
                                #17

                                Interesting, I hadn't considered the problem it that way, and I think for your points are valid. That said, I've only really developed for PC and I've only really been a .net developer professionally, I enjoy tinkering with other languages and I miss c++, which I use to write my dissertation. I think the deepest separation is between those who like programming and computing for its own sake, and those who do it solely as their day job. I think a large proportion of the latter group fall into your PC-centric category as this is what pays and what is easiest to get work in. Got my 5 anyway!

                                Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                                -Or-
                                A Dead ringer for Kate Winslett[^]

                                L 1 Reply Last reply
                                0
                                • B bob16972

                                  I feel the same way about C++ to C#. I've found you still need to check for null just as often and C#, without the .NET library (libraries are really a different topic...IMHO), is hardly the C++ 2.0 most C/C++ programmers had been longing for. I would like a reinvented C/C++ without all the historical baggage but I'd like to keep pointers and references the way they are. I had high hopes for C# but I think they missed a great opportunity to "fix" what was wrong with C/C++ and instead ended up trying to "fix" what was wrong with Java.

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

                                  bob16972 wrote:

                                  and instead ended up trying to "fix" what was wrong with copy Java.

                                  FFY.

                                  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]

                                  B 1 Reply Last reply
                                  0
                                  • R Rajesh R Subramanian

                                    C# to C++?! You shouldn't expect that move to be easy, and you should in fact be happy that you were not moving to C.

                                    "Real men drive manual transmission" - Rajesh.

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

                                    You shouldn't reveal we C programmers are not friendly with intruders.

                                    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]

                                    R 1 Reply Last reply
                                    0
                                    • L Lost User

                                      I've just moved to Python - you can't even tell a thread to terminate or pass variables by reference!

                                      Join the cool kids - Come fold with us[^] "Program as if the technical support department is full of serial killers and they know your home address" - Ray Cassick Jr., RIP

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

                                      Trollslayer wrote:

                                      Python

                                      we're talking about programming languages, aren't we? :rolleyes:

                                      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]

                                      L 1 Reply Last reply
                                      0
                                      • OriginalGriffO OriginalGriff

                                        CPallini wrote:

                                        you should find moving to VB refreshing...

                                        ...the parts other programming languages don't want to go anywhere near?

                                        Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together. Manfred R. Bihy: "Looks as if OP is learning resistant."

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

                                        OriginalGriff wrote:

                                        ...the parts other programming languages don't want to go anywhere near?

                                        Exactly: that's VB garbage collector's definition.

                                        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]

                                        1 Reply Last reply
                                        0
                                        • L Lost User

                                          I've just moved to Python - you can't even tell a thread to terminate or pass variables by reference!

                                          Join the cool kids - Come fold with us[^] "Program as if the technical support department is full of serial killers and they know your home address" - Ray Cassick Jr., RIP

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

                                          Trollslayer wrote:

                                          I've just moved to Python

                                          *Danger* Euphemism alert *Danger*

                                          Forgive your enemies - it messes with their heads

                                          My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                                          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