PHP --> C++ how easy or hard?

Discussion in 'PHP' started by existentialist, Dec 19, 2007.

  1. #1
    I am a newbie to the programming world. I am learning to code in PHP since about 2 months and am now reasonably proficient in basic PHP programming. I have no deep knowledge of mathematics or computer science, I am a business major.

    I recently realized that if I could code C++, I could get a steep raise in my current job (financial analyst) because a large part of my work is outsourced to coders to complete and the whole process works out to be quite expensive for my company. I also know some people working in similar profiles like mine whose C++ coding skills make them almost twice as valuable to their employers as a non-coding financial analysts like me.

    Any thoughts on how difficult or easy is it going to be for a basic PHP coder to become proficient in C++?

    Many thanks

    Existentialist
     
    existentialist, Dec 19, 2007 IP
  2. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    C++ is quite different from PHP in many many respects.

    PHP shields you from many things that C++ does not. C++ is designed as an all round language, not just a web page processor. You will need to understand far more about memory referencing and data typing in C++ than you do in PHP. Concepts such as event handlers, listeners, callbacks, and so on aren't really applicable to PHP.

    Dataaccess is much harder in native C++, where as PHP (especially when linked to a MySql database) is a doddle. But, you can do absolutely anything in C++. So, if someone says, write me a windows device driver for my new fangled USB device - you can do that with C++. You simply cannot with PHP.

    However, as with all these things, you just have to jump in there and start doing it. Get some good books. Start working through tutorials and you'll get there.

    At the end of the day, if you can program, you can program in any language. You just have to learn the differences.

    On the plus side, once you've learnt C++, you'll be able to learn anything else very quickly!
     
    ecentricNick, Dec 20, 2007 IP
  3. killaklown

    killaklown Well-Known Member

    Messages:
    2,666
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    165
    #3
    Once you learn one language, its much easier to learn another language. As you know what to do, you just need to write the code different. (sometimes its actually really close to another language)
     
    killaklown, Dec 20, 2007 IP
  4. existentialist

    existentialist Peon

    Messages:
    12
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks for your inputs, guys. It doesn't seem very difficult so far. Lets see how it goes ahead.
     
    existentialist, Dec 21, 2007 IP
  5. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #5

    Well I don't think this would be very true when moving from PHP to c++. You may know the concept of if statements and loops and things of that nature. But PHP doesn't have pointers (something a lot of people have trouble grasping at the start). Actual variable types (integer, double, ect.) . Then lets not forget about memory management which is also non existent in PHP.

    Soo yes you can learn it but it won't be as easy as picking up another language with loose types.
     
    InFloW, Dec 21, 2007 IP