g++ expected ';' before return
i got the following code beacuse im trying to understand the usage of getopt_long. everything seems fine but i get "expected ';' before return". What am i missing? Thank you all. 
    
    int next_option;
	const string short_options = "a:bcde";
	const struct option long_options[] = 
	{
		{"op1", 1, NULL, 'a'},
		{"op2", 1, NULL, 'b'},
		{"op3", 1, NULL, 'c'},
		{"op4", 0, NULL, 'd'},
		{"op5", 0, NULL, 'e'},
		{ NULL,0, NULL, 0}
	};
	
	do
	{
		next_option = getopt_long(argc,argv,short_options.c_str(),long_options,NULL);
		
		switch(next_option)
		{
			case 'a':
			cout <<" ";
			break;
			
			case 'b':
			cout <<" ";
			break;
			
			case 'c':
			cout <<" ";
			break;
			
			case 'd':
			cout <<" ";
			break;
			
			case 'e':
			cout <<" ";
			break;
			
			case '?': // invalid option
			cout <<" ";
			break;
			
			case -1:  //no more option
			cout <<" ";
			break;
			
			default:
			cout <<" ";
			break;
		}
		
	}
	while(next_option!=-1)
	return 0;

What's the procedure i have to follow to help me resolve errors of that kind?
g++ expected ';' before return
===

i got the following code beacuse im trying to understand the usage of getopt_long. everything seems fine but i get "expected ';' before return". What am i missing? Thank you all. 
    
    int next_option;
	const string short_options = "a:bcde";
	const struct option long_options[] = 
	{
		{"op1", 1, NULL, 'a'},
		{"op2", 1, NULL, 'b'},
		{"op3", 1, NULL, 'c'},
		{"op4", 0, NULL, 'd'},
		{"op5", 0, NULL, 'e'},
		{ NULL,0, NULL, 0}
	};
	
	do
	{
		next_option = getopt_long(argc,argv,short_options.c_str(),long_options,NULL);
		
		switch(next_option)
		{
			case 'a':
			cout <<" ";
			break;
			
			case 'b':
			cout <<" ";
			break;
			
			case 'c':
			cout <<" ";
			break;
			
			case 'd':
			cout <<" ";
			break;
			
			case 'e':
			cout <<" ";
			break;
			
			case '?': // invalid option
			cout <<" ";
			break;
			
			case -1:  //no more option
			cout <<" ";
			break;
			
			default:
			cout <<" ";
			break;
		}
		
	}
	while(next_option!=-1)
	return 0;

What's the procedure i have to follow to help me resolve errors of that kind?