Declaration syntax error handling

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akhilandrews
    New Member
    • Jan 2015
    • 8

    Declaration syntax error handling

    Code:
    void main()
    {
         clrscr();
    
         cout<<"\t\tMenu";
         cout<<"\n\n\t1.\tDisplay all the employees' info.";
         cout<<"\n\n\t2.\tDisplay specific employes' info.";
         cout<<"\n\n\t3.\tDisplay employee with max salary.";
         cout<<"\n\n\tEnter choice:";
         int n,i,a;
         cin>>a;
         int c[100]
         switch(a)
         {
    	  case 1:
    		 for(i=0;i<n;i++)
    		 c[i].display();
    		 break;
    	  case 2:
    		 cout<<"Enter ID:";
    		 int x;
    		 cin>>x;
    		 for(i=0;i<n;i++)
    		      if(c[i].getid()==x)
    			   c[i].display();
    		 break;
    	  case 3:
    		float max=0;
    		for(i=0;i<n;i++)
    		     if(c[i].getsal()>max)
    			  max=c[i].getsal();
    		for(i=0;i<n;i++)
    		     if(c[i].getsal()==max)
    		     c[i].display();
    		break;
    
         cout<<"\nDo you want to continue?(y/n):";
         char y;
         cin>>y;
         while(y=='y');
         {
         getch();
         }
         };
    
    };
    Declaration syntax error at line 89, I don't get this everything is proper.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    What's on line 89? I see only 47 on the post.

    Comment

    Working...