27 lines
		
	
	
		
			814 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			27 lines
		
	
	
		
			814 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| 
								 | 
							
								---
							 | 
						|||
| 
								 | 
							
								title: goto as a powerful utility
							 | 
						|||
| 
								 | 
							
								localeTitle: 转到一个强大的实用程序
							 | 
						|||
| 
								 | 
							
								---
							 | 
						|||
| 
								 | 
							
								# 介绍goto和标签的使用
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								goto是c ++中最强大但被高度低估的逻辑之一。如果正确使用goto,可以使用goto实现疯狂的优化量。 它确实如此命名。它涉及到下一个标签的提及,无论它在哪里。
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# 术语
							 | 
						|||
| 
								 | 
							
								```
							 | 
						|||
| 
								 | 
							
								goto - The keyword used to go to the particular label. 
							 | 
						|||
| 
								 | 
							
								 label - this can be named anything. 
							 | 
						|||
| 
								 | 
							
								```
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								# 句法
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								跳转;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								(没有<>);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								//这会将exe带到标签的下一个外观。
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								goto是超越所有循环的东西。在这一点上更清楚,这是一个例子。
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								https://code.sololearn.com/cI4qqQA8W2q3
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								但是,必须非常谨慎地使用goto,特别是在编码的早期阶段,因为它可能导致疯狂的问题,如果不能很好地理解的话。
							 |