This illustrates why I find that style of indentation hard to read. If you line them up and indent properly, it's easy to see what's missing.
I agree wholeheartedy.
I know coding preference ultimately comes down to what you're used to, but I've never seen any benefit in keeping the braces misaligned.
Last edited by petszk; May 16th, 2011 at 08:16 PM.
...I've never seen any benefit in keeping the braces misaligned.
It lets you put more code on the screen.
Was probably important when people used 24-lines text terminals.
And no, I don't like that style.
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinWindows - replacement windows manager for Visual Studio, and more...
Looking at the code posted here, I was not able to spot the mistake myself at a glance. Looking at the image file, I was able to guess the problem immediately, and my guess was correct.
Considering that I prefer the Allman style (the latter of GCDEF's examples) myself, I'd say that the problem really is (lack of) indentation and having an inkling of what to look for when faced with that error message.
Oh, and speaking of indentation: you clearly have good indentation, so post your code here in [code][/code] bbcode tags to preserve it.
C + C++ Compiler: MinGW port of GCC
Build + Version Control System: SCons + Bazaar
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.