为什么重复和更多的分号结束的表达式不会导致Visual Studio编译器中的错误? [英] why duplicate and more semicolon at end of expression not cause error in visual studio compiler?

查看:184
本文介绍了为什么重复和更多的分号结束的表达式不会导致Visual Studio编译器中的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

视觉工作室剂量不会对重复的分号造成任何不同,或者一个在编译代码中引起错误,这是在旧的编译器规则,如turbo c或另一个反对!

visual studio dose not make any differentfor duplicate semicolon or one to couse an error in compiling code this is against at older compiler rules such as turbo c or another !

这是确定代码

int x ;;;;;;;  

int x;


推荐答案

额外的分号只是C ++语言。

The extra semi-colons are just empty statements in the C++ language. It's not a syntax error, so it compiles fine.

分号是什么结束语句,所以你可以做这样的事情:

Semi-colons are what end statements, so you can do things like this:

int x; int y; int z;

全部在一行。

这篇关于为什么重复和更多的分号结束的表达式不会导致Visual Studio编译器中的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆