how repair the faild?

#include<iostream>
      using namespace std;
	  #include<ctime>
      int rolldice(void)
      int main()
      {
		  enum status {continuo,won,lost}
		  int sum , mypoint;
          status gamestate;
		  srand(tim(0))
		  sum=rolldice();
		  switch (sum)
		  {case 7;
           case 11;
          gamestate=won;
		  break;
           case 2;
           case 3;
	       case 12;
          gamestate=lost;
		  break;
		  default;
			  gamestate=continuo;
			  mypoint=sum;
				  cout<<"enter:"<<endl;
			    break;
				while (gamestate==continuo){
					sum=rolldice();
				if(sum=mypoint)
					 gamestate=won;
				else
					if(sum=7)
						gamestate=lost;}}}
		   int rolldice(void)
		   {
			   int die 1,die 2,worhsum;
			   die 1=1+rand()%6;
			    die 2=1+rand()%6;
				worhsum=die 1+die 2;
				return worhsum;}

First, you need to learn how to format your code. Good that you got the code tags but what you have looks terrible and is hard to follow. Give this article a read: http://www.gidnetwork.com/b-38.html

Secondly, your switch syntax is completely wrong, you need colons after the cases not semicolons:

switch(sum)
{
     case 7:  //code for case 7
                 break;
     case 11: //code for case 11
                  break;
     
    // (etc.)
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.