r/cpp • • Sep 30 '21

Why is c++ community so pedantic in stackoverflow?

Please don’t get me wrong. What i mean is why answer “you need read books”, “you should read the documentation”, or focus on tangent things instead of actually try to answer the questions?

in contrast, here in reddit, i even get job offers when asking questions.

260 Upvotes

177 comments sorted by

View all comments

Show parent comments

11

u/ronchaine Embedded/Middleware/WG21 Oct 01 '21

argv is required to be char* since C++'s main is C-ABI compatible and the OS calling the executable does not understand what strings are.

OS C runtime pushes the argc and argv to the stack, and C++ can't pretend that those would be something else.

-2

u/Se7enLC Oct 01 '21

Explaining why C++ still uses C doesn't change it.