There are more letters to be written in C++ and you are including in your executable the full string.h header. Is that valid? Are you really using all of it? For a Desktop application, this makes no sense but for embedded systems, every byte counts.
"You can write using namespace std; and...": No. Do not do this in your code. Check this thread at StackOverflow and do some research about it and why is considered a bad practice.
For the 'string' issue, let me suggest another approach:
// Ctypedefchar*string;stringstr="hello";
As an answer to people who say things like: "C is bad because it doesn't have strings!", consider asking about what they are trying to do. In general, they are complaining about scapegoats.
Hi, I'm Swastik Baranwal, a software developer from New Delhi, India passionate about open-source contribution, Gopher, Pythoneer, Compiler Design and DevOps.
There's a big difference between people complaining about something and people being really mindful about knowing the options to it. Compare:
There are more letters to be written in C++ and you are including in your executable the full
string.h
header. Is that valid? Are you really using all of it? For a Desktop application, this makes no sense but for embedded systems, every byte counts.using namespace std;
and...": No. Do not do this in your code. Check this thread at StackOverflow and do some research about it and why is considered a bad practice.For the 'string' issue, let me suggest another approach:
As an answer to people who say things like: "C is bad because it doesn't have strings!", consider asking about what they are trying to do. In general, they are complaining about scapegoats.
Definitely! I really agree with you. I hope Dev deletes/changes their tweet.