I am having trouble with the if and else clauses here, can anybody help me troubleshoot this code? I have been going over it and to me it looks like it should be able to build, but visual studio doesn't like the if/else for some reason. Any help is greatly appreciated.
You need to put braces { } around the block of statements to be controlled by the if/else. Without them, only the very first statement after the if is dependent upon it.