Is C the only good thing about C++?

Is C the only good thing about C++?

C++ without using functions from C standard library
#include
#include
#include

int main(int argc, char *argv[])
{
std::string str;
str = "Hello World!";
int count = 10;
if (argc > 1) {
std::string strargv1 = std::string(argv[1]);
count = std::stoi(strargv1);
}
for (int i = 0; i < count; i++)
std::cout

it's more powerful xDD

C# is better than both.

t. pajeet

If all you're doing is absurdly simple console IO, then yes.

using namespace std;

t. old faggot

>2016
>using a DESIGNATED language

>Hello World comparison

it doesn't matter

your opinion and input on the subject matter are completely irrelevant as you know literally fuck-all about either language, and most likely programming in general

C is for largely embedded systems nowadays
writing much of anything else is quite a bit more tedious

C++ is utilized in a much wider range, but for example web development it isn't any good for

C# is good as a back-end systems language, among other things
however the accompanying overhead of a framework and virtual machine don't always make it a good choice

tl;dr each language has its uses and trivial syntax length comparisons only show that you're a retarded clueless fizzbuzz engineer

>Deliberately writing code like a retard to make an invalid point about the brevity of a language.

std::string str;
str = "Hello World!";


std::string str = "Hello World!";


std::string strargv1 = std::string(argv[1]);
count = std::stoi(strargv1);


std::string strargv1 = std::stoi(strargv1);


The only substantial difference that you didn't artificially introduce yourself is iostreams, which despite being verbose comes with memory safety guarantees printf doesn't have. Otherwise all you did was write the same thing twice while introducing a bunch of unnecessary temporary variables in the C++ side.

>but for example web development it isn't any good for
Except C++ is literally the best language for the web.

The c++ example is more readable though.

#include
#include
#include

int main(int argc, char *argv[])
{
using namespace std;
string str = "Hello World!";
int count = 10;
if (argc > 1)
count = stoi(string(argv[1]));
for (int i = 0; i < count; i++)
cout

auto str = "hello world"

that doesn't yield a std::string, unless you append s to the end (C++17 only?)

So c++ has a stoi function but doesn't have a proper toString one? (no boost doesn't count).

>(C++17 only?)
>?
this is partly why C++ is so horrible

std::to_string()

Wow this trivial example BTFOs C++ for good.

Lambdas

>C++ is horrible because it's still getting regular updates
kill yourself as soon as possible

I knew about that, but it's only C++11 and later.

yes and?

#include
#include
#include

int main(int argc, char *argv[]) {
std::string str ("Hello World!");
int count;
if (argc == 1) {
count = 10;
} else if (argc == 2) {
std::istringstream iss (argv[1]);
iss >> count;
if (iss.fail () || !iss.eof ()) {
std::cerr

#include
#include
void hello()
{
std::cout

>standard libs only
That's never fair.