C++ is newer and accepted by plenty, and used by all famous programming companies, so you use it, end of story xP
Why light a fire with stones, when you can use a lighter? :P
C++ is newer and accepted by plenty, and used by all famous programming companies, so you use it, end of story xP
Why light a fire with stones, when you can use a lighter? :P
Currently research OpenGL
What problem is this fixing? In some very poor parts of India, a man might douse his wife with kerosene if he is unhappy with her. It is a cheap, effective and widely available weapon. Fortunately, it is not often so premeditated that a man would seek out an appropriate base, such as Styrofoam, and instead launch a napalm cocktail at his former lover. Although I'm sure such incidents are occasionally reported.
"If you tell the truth, you don't have to remember anything"
-Mark Twain
It's called moving from the old stuff to the new stuff! There doesn't have to be a reason, you just do it!
Currently research OpenGL
Usually, we move to new stuff because of a reason. Usually, it is because it provides more benefits, or it's cheaper.
So it is with C++ over C, as well. C++ is very much a all-in-one language, incorporating not one style but many.
I have always argued that C should go away and be replaced with C++, but unfortunately, the world does not always agree.
C is still cheaper to implement than C++, which is probably the biggest reason it's still in existence, especially for embedded systems.
Maybe there is a reason, you just don't have to know it xP
All the sexy people code in C++ >: D
Currently research OpenGL
Wow. I had to be bored to death to read this topic. How bored must you guys be replying?
Seriously, why even throw food to the troll?
Call the FBI... We've got a "situtation" here B-|
Currently research OpenGL
Well, atleast I'm posting 'cause I'm bored... EVOEx, how did you know? o.o You better not be stalking me!
Currently research OpenGL
And what exactly was it from the "C++ part" that you needed to use in C, which C++ could not do better?
And how big projects, exactly, have you worked on? How big the team and how many lines of code?
And why do you go against known industry facts? Is it because that they are untrue to you, as you see it?
Of course, lots of examples here and otherwise show that it's entirely possible to write rubbish code in almost any language. But most people that have experience in working on large software projects.
I currently work with code where the entire code-base including test-code is tens of megabytes - written mainly in C++, but some third party code is using C.
I have also worked on code that is pure C [or at least "not C++"], of similar size.
Neither language makes the task straightforward or simple - there is a need to know what a lot of code does - but C++ certainly has some features that IMPROVES the ability to write large programs in the language - for example, the fact that you can keep portions of a class private and access it through setter/getter functions (or similar) makes it possible to know if changing the class is going to affect a lot of code or not - which is more than you can say if you are trying to make the same decision about a struct in C - you have to literally search for the struct member [and then from the search results sort out which are REAL hits and which aren't, as searching for "address" as a member of a struct may of course find all sorts of other things named "address".]
But there are certainly successful, large projects written in C too - it just is a bit harder version of "not easy".
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
You can design and write bad code in any language, I don't really see what makes C++ so special.