0
bool validateCourse ( int courseNum )
{
         switch ( courseNum )
     {    
         case 4587:
         case 4581:
         case 9696:
         case 4590:           
         case 4580:
         case 4599:
         case 4583:
         case 8997:
              return true;
         case default: 
              return fasle;
     }        
}

I need it so if the user enters anything but these course numbers it will return false. When I compile it says there is something wrong with the default. Can anyone help?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by chiwawa10
0
bool validateCourse ( int courseNum )
{
         switch ( courseNum )
     {    
         case 4587:
         case 4581:
         case 9696:
         case 4590:           
         case 4580:
         case 4599:
         case 4583:
         case 8997:
              return true;
         case default: 
              return fasle;
     }        
}

I need it so if the user enters anything but these course numbers it will return false. When I compile it says there is something wrong with the default. Can anyone help?

Lol! I guess my compiler doesn't recognize "fasle" and "false" as the same thing...

2

Just add the line:

#define fasle false

to the top of your file and the program will work!

Edited by CppFTW: n/a

Votes + Comments
haha, that was nice :)
Very bad - but what a laugh :)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.