Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Submission + - Typical errors in C/C++ programming

An anonymous reader writes: As long as programming lives, the developers will make errors. Stepping on the same rake, they sometimes think that if code is working now, everything will be fine. But once they add an additional function or a condition, the error that seemed insignificant turns into a massive headache for the programmer and his colleagues.

Some programmers cope the code fragments forgetting to change the necessary names and values. Others aren’t attentive reading the documentation, which gives a description of a function, or even don’t look at the documentation, hoping that the intuition won’t fail them. Others make the code too complex by creating macros in those fragments where simple functions could work well. There are plenty more examples like these ones.

Of course it’s impossible to warn about all the possible ways to make an error, but it would be quite real to draw the attention to the most common error patterns. At least a person will know the variety of wrong paths to take and will be more careful, which will save time during the debugging and testing.

There are plenty of resources that can help:

Of course, it is be a drop in the ocean of useful information, but perhaps it would be enough to read during a weekend. Enjoy!

This discussion was created for logged-in users only, but now has been archived. No new comments can be posted.

Typical errors in C/C++ programming

Comments Filter:

The best way to avoid responsibility is to say, "I've got responsibilities."

Working...