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. Moving from C# to C++

Moving from C# to C++

Scheduled Pinned Locked Moved The Lounge
csharpc++questionlearning
108 Posts 36 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.
  • C c2423

    I already know C# and I'm trying to learn C++ (it seems to be more required by employers.) All the reference material I have on C++ is geared to learning from absolute basics and I get tired of reading about the difference between ++x and x++ etc (I still read it in case there happens to be something subtle that I wouldn't already know.) So can anybody recommend any good resources that are comprehensive, but won't re-cover stuff thats the same in C#? Thanks, Chris

    N Offline
    N Offline
    Nemanja Trifunovic
    wrote on last edited by
    #19

    c2423 wrote:

    I already know C# and I'm trying to learn C++

    Two rules: 1) Forget everything you know about C# - despite similar syntax it is a *very* different language with different goals. 2) Get a recent book (not the Eckel's one). Stroustrup's Programming -- Principles and Practice Using C++[^] is probably pretty good for a beginner. Another good one is Accelerated C++[^] Good luck.

    Programming Blog utf8-cpp

    C K 2 Replies Last reply
    0
    • A Anna Jayne Metcalfe

      Anytime! The nice thing about the Meyers books (there are a few others such as "More Effective C++" and "Effective STL") is that they teach you the common mistakes not to make, hopefully before you get into a habit of making them. :) Whereabouts in M25 land are you by the way? Beth and I are based in Bournemouth, but we've family in in Redhill so we tend to be up that way reasonably often. :beer:

      Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

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

      I'm near Bromley.

      A 1 Reply Last reply
      0
      • L Lost User

        c2423 wrote:

        C++ pointer questions

        I'm not aware of any great differences with C# pointers, what are they? Besides not requiring the unsafe keyword to use..

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

        No idea - I never need to use unsafe blocks in my code.

        1 Reply Last reply
        0
        • S Single Step Debugger

          Yes, but only C# programmers with strong C++ experience knows that the unsafe context exists in C#. ;)

          The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

          C Offline
          C Offline
          c2423
          wrote on last edited by
          #22

          I know of its existence, but have only ever needed to use it once (and then for an algorithm I shamelessly stole from MSDN or somewhere like that)

          1 Reply Last reply
          0
          • S Single Step Debugger

            You may consider Bruce Eckel’s “Thinking In C++” – its free for download I the web. It’s terrible book for learning C++, but is also perfect reference for the language with tons of examples and very deep look to templates. Do you have some C background?

            The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

            C Offline
            C Offline
            c2423
            wrote on last edited by
            #23

            I did C at university, but I got a C# job immediately after leaving so I'm a bit rusty. Thanks for the recommendation - I do like books to be free :) Thanks, Chris

            S 1 Reply Last reply
            0
            • N Nemanja Trifunovic

              c2423 wrote:

              I already know C# and I'm trying to learn C++

              Two rules: 1) Forget everything you know about C# - despite similar syntax it is a *very* different language with different goals. 2) Get a recent book (not the Eckel's one). Stroustrup's Programming -- Principles and Practice Using C++[^] is probably pretty good for a beginner. Another good one is Accelerated C++[^] Good luck.

              Programming Blog utf8-cpp

              C Offline
              C Offline
              c2423
              wrote on last edited by
              #24

              Fair enough, but despite the differences, I'd rather not read about the syntax of loops, if statements, switch etc Thanks for the book recommendations :) Thanks, Chris

              1 Reply Last reply
              0
              • C c2423

                I'm near Bromley.

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

                Not far away at all. Hang around here long enough, and sooner or later you may just run into Beth and I on our travels. :laugh:

                Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                1 Reply Last reply
                0
                • C c2423

                  I live south of London, inside the M25. Don't get me wrong, I still do OK without the C++ it's just that it seems it would give me the edge over people when it comes to it. Recently I did 7 (yes, seven) rounds of interviews for a position for a C# position, and I eventually didn't get it coz I couldn't answer their C++ pointer questions.

                  T Offline
                  T Offline
                  ToddHileHoffer
                  wrote on last edited by
                  #26

                  Interesting. Back in 2001 when I was a report writer / sql programmer and learning .net, (on the job) the senior programmer told me not to bother with C++. He said, programming .net was much easier and that he would not even take another C++ job. So I never bothered to learn it. Anyway, that sucks that you had 7 interviews and you didn't get the job. That's really awful, they should have paid you for going to all those interviews. You probably don't want to work in a place that bureaucratic anyway. If you are looking to get ahead and make some serious money you might want to try learning to program sharepoint 2010 before it released. I have a feeling it is going to be very popular. And it looks like programming it will be much easier than the current version (which is painful).http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx[^] It is just my opinion. Perhaps C++ will get you where you want to be, but I decided to specialize in ASP.Net only back in 2001 and it has really worked out great. If programming SP 2010 is pretty painless, I'm going to really dive into that as well. Another trick is to really learn a 3rd party tool such as Telerik or Infragistics. If you can get your company to purchase you a license, becoming an expert with Telerik (or another popular 3rd party suite) will not only help you get a better job, you'll be able to make really slick front ends easily. Style over substance. Good luck!

                  I didn't get any requirements for the signature

                  C 1 Reply Last reply
                  0
                  • C c2423

                    I already know C# and I'm trying to learn C++ (it seems to be more required by employers.) All the reference material I have on C++ is geared to learning from absolute basics and I get tired of reading about the difference between ++x and x++ etc (I still read it in case there happens to be something subtle that I wouldn't already know.) So can anybody recommend any good resources that are comprehensive, but won't re-cover stuff thats the same in C#? Thanks, Chris

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

                    Even if you don't get a job doing C++, it's a good thing to learn C++. It helps to learn where newer languages come from, and it helps to learn where the "missing features" are as well (full use of const in c# anybody?).

                    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                    My blog | My articles | MoXAML PowerToys | Onyx

                    C 1 Reply Last reply
                    0
                    • T ToddHileHoffer

                      Interesting. Back in 2001 when I was a report writer / sql programmer and learning .net, (on the job) the senior programmer told me not to bother with C++. He said, programming .net was much easier and that he would not even take another C++ job. So I never bothered to learn it. Anyway, that sucks that you had 7 interviews and you didn't get the job. That's really awful, they should have paid you for going to all those interviews. You probably don't want to work in a place that bureaucratic anyway. If you are looking to get ahead and make some serious money you might want to try learning to program sharepoint 2010 before it released. I have a feeling it is going to be very popular. And it looks like programming it will be much easier than the current version (which is painful).http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx[^] It is just my opinion. Perhaps C++ will get you where you want to be, but I decided to specialize in ASP.Net only back in 2001 and it has really worked out great. If programming SP 2010 is pretty painless, I'm going to really dive into that as well. Another trick is to really learn a 3rd party tool such as Telerik or Infragistics. If you can get your company to purchase you a license, becoming an expert with Telerik (or another popular 3rd party suite) will not only help you get a better job, you'll be able to make really slick front ends easily. Style over substance. Good luck!

                      I didn't get any requirements for the signature

                      C Offline
                      C Offline
                      c2423
                      wrote on last edited by
                      #28

                      All good points, but I am trying to position myself into a certain industry as part of a longer term plan. Unfortunately its hard to find jobs in the right area that don't need C++. I will take a look at the SharePoint 2010 though - I have already done some development for SharePoint so it would be good to see what new features there are. Thanks, Chris

                      1 Reply Last reply
                      0
                      • P Pete OHanlon

                        Even if you don't get a job doing C++, it's a good thing to learn C++. It helps to learn where newer languages come from, and it helps to learn where the "missing features" are as well (full use of const in c# anybody?).

                        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                        My blog | My articles | MoXAML PowerToys | Onyx

                        C Offline
                        C Offline
                        c2423
                        wrote on last edited by
                        #29

                        My understanding is that you can also use C/C++ as a lingua franca when talking to other developers, so no shortage of reasons to learn! Thanks, Chris

                        P D 2 Replies Last reply
                        0
                        • C c2423

                          I did C at university, but I got a C# job immediately after leaving so I'm a bit rusty. Thanks for the recommendation - I do like books to be free :) Thanks, Chris

                          S Offline
                          S Offline
                          Single Step Debugger
                          wrote on last edited by
                          #30

                          In this case you may consider spending one week playing with the C pointers. Make your own queue, use multiple references, break the memory, use function pointers etc. In some OOP scenarios in C++ you will need to be very familiar with the pointers.

                          The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

                          C 1 Reply Last reply
                          0
                          • C c2423

                            My understanding is that you can also use C/C++ as a lingua franca when talking to other developers, so no shortage of reasons to learn! Thanks, Chris

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

                            That kind of depends - a lot of VB programmers won't understand you (and one heckuva lot of PHP developers either).

                            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                            My blog | My articles | MoXAML PowerToys | Onyx

                            C N 2 Replies Last reply
                            0
                            • C Christian Graus

                              c2423 wrote:

                              This is the second reccomendation for Stroustrup,

                              Well, it IS his language :-)

                              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

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

                              Yep, and whole conferences just stop when his hand goes up in the middle of a session.... :laugh:

                              Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                              G 1 Reply Last reply
                              0
                              • S Single Step Debugger

                                Yes, but only C# programmers with strong C++ experience knows that the unsafe context exists in C#. ;)

                                The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

                                D Offline
                                D Offline
                                Dan Neely
                                wrote on last edited by
                                #33

                                I've seen it occasionally in 3rd party, or reflected framework code, but aside from one failed (performance issues) attempt at writing an rs232 library I've never actually written any in 4 years with .net.

                                The European Way of War: Blow your own continent up. The American Way of War: Go over and help them.

                                B 1 Reply Last reply
                                0
                                • C c2423

                                  My understanding is that you can also use C/C++ as a lingua franca when talking to other developers, so no shortage of reasons to learn! Thanks, Chris

                                  D Offline
                                  D Offline
                                  Dan Neely
                                  wrote on last edited by
                                  #34

                                  IMO C#, Java, or even (shudder) VB are better for that than C/++. The former two share a syntax with their predecessors while not possessing as many obscure items or as complex a syntax to confuse people who haven't used it recently. By not having as many complex features C#/java are easier on someone who's familiar with a Cstyle language but not the specific one being used. The virtue of Vb's many sins is verbosity, and while annoying in many ways being verbose makes it easier to figure out if you're not familiar with it. That said, as long as you're not writing in an obfuscation tool masquerading as a programming language if you can't get the jist of a reasonable size snippet of code in an unfamiliar language you're probably not in the right business. EDIT: ... or at a minimum you should change your job title from developer/computer scientist/software engineer to code monkey.

                                  The European Way of War: Blow your own continent up. The American Way of War: Go over and help them.

                                  C 1 Reply Last reply
                                  0
                                  • D Dan Neely

                                    I've seen it occasionally in 3rd party, or reflected framework code, but aside from one failed (performance issues) attempt at writing an rs232 library I've never actually written any in 4 years with .net.

                                    The European Way of War: Blow your own continent up. The American Way of War: Go over and help them.

                                    B Offline
                                    B Offline
                                    Blake Miller
                                    wrote on last edited by
                                    #35

                                    dan neely wrote:

                                    but aside from one failed (performance issues) attempt

                                    No why does that not surprise me... the performance issues, specifically ... ;)

                                    1 Reply Last reply
                                    0
                                    • A Anna Jayne Metcalfe

                                      Yep, and whole conferences just stop when his hand goes up in the middle of a session.... :laugh:

                                      Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                                      G Offline
                                      G Offline
                                      Gary R Wheeler
                                      wrote on last edited by
                                      #36

                                      Sort of like when God says "Uh, excuse me..."

                                      Software Zen: delete this;
                                      Fold With Us![^]

                                      A 1 Reply Last reply
                                      0
                                      • G Gary R Wheeler

                                        Sort of like when God says "Uh, excuse me..."

                                        Software Zen: delete this;
                                        Fold With Us![^]

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

                                        That's exactly it. A ball of silence emanating from the hand in question, followed by giggling from all around the hall as people began to realise exactly who's hand that was.... :laugh: It happened at ACCU 2007 during a slightly opinionated Dan Saaks session on the correct use of const. The price of the conference was worth it just to see that one event!

                                        Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                                        G M 2 Replies Last reply
                                        0
                                        • A Anna Jayne Metcalfe

                                          That's exactly it. A ball of silence emanating from the hand in question, followed by giggling from all around the hall as people began to realise exactly who's hand that was.... :laugh: It happened at ACCU 2007 during a slightly opinionated Dan Saaks session on the correct use of const. The price of the conference was worth it just to see that one event!

                                          Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                                          G Offline
                                          G Offline
                                          Gary R Wheeler
                                          wrote on last edited by
                                          #38

                                          I wish I would have seen that. We hired Saks to come in and teach a course in C++ back in the mid 90's. He was a good instructor, but I remember there were certain things that could cause him to go off on a tangent, const among them.

                                          Software Zen: delete this;
                                          Fold With Us![^]

                                          A 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