Basic Fail #1
February 8th, 2010 — 0 Comments — Permalink
for (int t; t<n; t++) { ... }
... Forgetting to initialise the variable in a for loop.
In the above example, if t is not initialised to anything then the program will still compile and run, but display odd behaviour. I seem to be doing this a lot recently - it can be tricky to track down and just infuriated me for half an hour. Oops.
This post will expire in 0 minutes
Discussion
There are no comments for this post.Leave A Reply
You may use Markdown syntax but raw HTML will be escaped and headings normalised.