C++ is
- more type safe
- safer memory management (unique_ptr, smart_ptr, weak_ptr)
- classes with destructors (RAII is nice)
- generic containers in standard library (no need to implement dynamic array for every other project)
C is
- cleaner
- simpler and easier to learn
C is nice for beginners, but real programmers use C++.
c = 42;
cpp = c++;
if (cpp > c)
std::cout << "C++ is superior to C" << std::endl;
else if (c > cpp)
std::cout << "C is superior to C++" << std::endl;
else
std::cout << "C/C++ are equal" << std::endl;
return 0;
}
>>11 >>12
He wanted it to replace C, not just to be a new/better language. If he had less shame and more ENTERPRISE, he would've called it "C 2.0" or maybe just "C."
Name:
Anonymous2012-02-22 13:52
>>13
He should have called it D or something, but then again, who cares about Bjarne? He's a fucking retard.
>>29 It it's Lisp, it's shit.
Do you mean "if it's in Lisp"?
Name:
Anonymous2012-02-23 17:43
Well, in India, you're not a good programmer until you can write heaps of short algorithms like The Fibonacci, The Factorial, The Winked Wist Traversal, and The Bubble Sort in Turbo C.