Re: If statements inside switch statements?

  • From: "Bill Gallik" <BillGallik@xxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Mon, 26 Jul 2010 14:53:12 -0500

Comment out the entire "if/else" construct and see if your program still compiles. Seems to me you have a syntax error somewhere in your code prior to the "if/else" construct altogether. The problem is that the compiler is flagging an error that is obvious (else with no if" rather than more thoroughly examining the code to detect a previous error. That's one of the pitfalls of C/C++.


And I am in no way dismissing your capability -- it's a very easy oversight to make.
----
Holland's Person, Bill
E-Mail: BillGallik@xxxxxxxxxxxxxx
- The early bird may get the worm, but the second mouse gets the cheese!
__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: