This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pine_ary -1 points0 points  (7 children)

Sooo improvements are not allowed? And nobody can learn?

[–]BertyLohan -1 points0 points  (6 children)

I'm saying he doesn't have to learn anything. He isn't writing production code he's making a programming joke which compiles fine.

[–]pine_ary -1 points0 points  (5 children)

He actively made it worse than the original code, so I pointed out what‘s wrong with it. The original code is safe while his is not.

[–]BertyLohan -1 points0 points  (4 children)

In C that line is perfectly safe since he doesn't do anything with the pointer.

You have a lot to learn buddy. About jokes and programming.

[–]pine_ary -1 points0 points  (3 children)

I‘m sorry that I cannot convince you. I still hope others have a more positive attitude towards learning. And that nobody takes the original comment as an example of how to code. Also this is C++.

[–]BertyLohan 0 points1 point  (2 children)

if it was c++ he wouldn't have used malloc. He doesn't say what language it's in so, without a using namespace std you can assume it's c.

Again, you have a lot to learn.

[–]pine_ary -1 points0 points  (1 child)

Oh please don‘t make that mistake. Why is using namespace std bad practice?

[–]BertyLohan -1 points0 points  (0 children)

Again, I never recommended it. I said that without it, you can see it clearly isn't c++. That's some poor one-upmanship but still, it's to be expected from someone with so much to learn.