Thread: Php and c++ programming

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    6

    Php and c++ programming

    Hi
    i am new in programming, i just want to know, if it is possible, that someone, will be an expert in c++ programming and also an expert in php programming, i know both programming is different, but i just want to know, because the instagram guy, started using c++, and end up using php and html 5, Thanks

  2. #2
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    poor instagram guy then... sorry for him

    well, to me, C/C++ knowledge will help you to get idea and syntax of most languages around. you may start with any language, depending on your needs any requirements you may have to switch to other language.

    For example...wanna write some iPhone apps? welcome to the world of Objective-C

  3. #3
    Registered User
    Join Date
    Nov 2012
    Posts
    6
    Is it better to practice logic and algorithm using c++? another question, if i study c++, is it worth it? i mean in I.T industry is there a lot of demand for a c++ programmer?

  4. #4
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Not being a programmer, anything I will say about the market demad to a C/C++ programmer is nothing but a stab in the dark.

    But, having hands on experience, I would say, being a programmer does not really depend on your knowledge on a specific language but the ability to design a proper algorithm for the problems you may have. Of course an expertise is always needed.

    Googling anything will not take more than half an hour.

    But yes, to be able to write proper and bug free code, you should know any language in deep. To me, C and C++ are good choices to start with (wiyh a lot of useful APIs around for different tasks)

  5. #5
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by fnoyan View Post
    But yes, to be able to write proper and bug free code, you should know any language in deep.
    Deep knowledge of a programming language is neither necessary nor sufficient to "write proper and bug free code".

    There are many things that are more important. In my experience, the dominant cause of faulty programs is the programmer not properly understanding the problem they are trying to solve (i.e. not understanding the requirement).
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  6. #6
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    275
    Well, I think it is much more easier to get a SIGSEGV from a not properly written C code than a Java or VB code.

  7. #7
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by fnoyan
    Well, I think it is much more easier to get a SIGSEGV from a not properly written C code than a Java or VB code.
    And your point is?

    Remember, a bug is a bug, whether it crashes the program or results in incorrect output.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  8. #8
    Registered User
    Join Date
    Nov 2012
    Posts
    6
    Thanks for the reply guys, my plan is to practice algorithm using c++ , and be an expert in php, because c++ is kinda hard language compared to php, correct me if i am wrong with my plan

  9. #9
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    Quote Originally Posted by david123456 View Post
    Thanks for the reply guys, my plan is to practice algorithm using c++ , and be an expert in php, because c++ is kinda hard language compared to php
    So why practice 'algorithm' with C++ ?

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by david123456 View Post
    Thanks for the reply guys, my plan is to practice algorithm using c++ , and be an expert in php, because c++ is kinda hard language compared to php, correct me if i am wrong with my plan
    Every language has its up and downs, and what language is more difficult than others depends partly on the language (C is harder than php, for example), and also on the skill and mindset of the programmer.
    Yes, C++ has tons of pitfalls, mainly due to its C inheritance. Yet, I would hardly say it is difficult if you learn what constructs are good and which are bad. It also has advantages over PHP, the biggest ones being type safety and no garbage collection (C++ tends to use reference counting for automatically managing memory; though, of course, you, the programmer, has to specify what variables to clean up).

    Best bet? Just learn both languages (and more), but don't become an "expert" in any of them. Just enough to know the good practices and the bad and be sufficiently comfortable with them.
    Btw, there's also ASP.NET which is also a server-side language like PHP, but with type safety (very important for large projects, as you'll see).
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 09-11-2012, 01:03 AM
  2. Replies: 4
    Last Post: 12-11-2011, 04:25 PM
  3. small programming job VCPP / Object Oriented Programming
    By calgonite in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 01-04-2006, 11:48 PM
  4. Total newb to programming here... Question about the many programming languages. Ty!
    By tsubotakid1 in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 10-05-2003, 10:32 AM