Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Should I learn C++ before C#

  1. Jul 16, 2008 #1
    I have a hardware design thesis project and I'll be required to write a desktop windows application that will interpret data from a wireless blue tooth device.

    I'm currently looking at the Microsoft visual studio express dev environment and tutorials regarding C++ and C#.

    Now most of my friends doing PhD suggested I do the GUI in C#.

    Should I learn C++ prior to C# to get a better handle of the two, or jump straight into learning C# due to time constraints?


    Edit:

    I have 3 years of programming background in C, kernal programming with RTI linux (6 months) and 2 Years of java behind me. However I'm not that confident a programmer, would anyone have any further tips/sites for me to look at in the mean time?
     
  2. jcsd
  3. Jul 16, 2008 #2

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    If you want to program in C#, just learn C#. It's not hard to pick up; it took me about a month.

    There are benefits to learning C++, of course, but as a stepping stone it won't be much good at all.
     
  4. Jul 16, 2008 #3
    I picked up C# several years ago when it first came out. I had maybe a year of C++ under my belt and it was a breeze. I don't see any reason why you can't drive right into C#.
     
  5. Jul 16, 2008 #4

    Dale

    Staff: Mentor

    Ditto the above. If you want to use C# then just learn C#. If later you find you need to use C++ then you can learn C++ at that point.
     
  6. Jul 17, 2008 #5
    What advantages does C# have over C++? I know a bit of C++, but I've only ever worked with consoles, however before completing my BS, I want to create a GUI based application on windows, what would I want to learn further in C++ or jump to some other language? I still have three more years to go :D.
     
  7. Jul 17, 2008 #6

    jim mcnamara

    User Avatar
    Science Advisor
    Gold Member

    Learn what you intendto or must use. Deferring getting into C# is a waste of your time.
     
  8. Jul 17, 2008 #7

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    In a nutshell:
    C++ programs run faster. C# programs are developed faster.
     
  9. Jul 17, 2008 #8
    So C# is easier to code in than C++?
     
  10. Jul 17, 2008 #9
    That's too simplistic an approach to the issue. C# is more suited to some types of project than C++, and C++ is more suited to other types of project than C#. Ultimately, the question of which language is better suited to a given objective would be decided on a case by case basis.
     
  11. Jul 17, 2008 #10
    Go with C#. C++ is great but it's kind of messy. You'll get confused over minor things instead of learning the big picture. You don't need one for the other, either. C# has similarities to C++, but it's still different. It's like asking whether you should earn how to ride a motorcycle before learning how to ride a car. Doesn't really matter.

    The cool thing is that once you learn a programming language, jumping into a different one is pretty easy.
     
  12. Jul 19, 2008 #11
    Thanks, I'll focus on C# then.

    Would the microsoft express tutorials be sufficient?
     
  13. Jul 19, 2008 #12

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    They'll probably get you started just fine.

    I was able to program in C# after just reading the design spec sheet (~90 pages) and playing around with it.
     
  14. Jul 22, 2008 #13
    thanks for the help
     
  15. Jul 28, 2008 #14
    First question, why do you want to learn those languages anyway, when you already have
    3 years of C programming under your belt? The Win32 API is coded in C, so you should be able to do Windows programming already.

    Do you have experience in object oriented design? I am asking this because you have been coding in C for three years, and C is a procedural language, while C# is highly object oriented, with C++ being in the middle. While learning the syntax of of C# may be easy, the design of the programs written in C and C# are very, very different, so there is a very high possibility that you will struggle with the language.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?