【C++】在右括号后面加分号

#include <iostream>
#include <string>

int main()
{
	{
		const std::string s = "a string";
		std::cout << s << std::endl;
		{
			const std::string s = "another string";
			//std::cout << s << std::endl;}}
			std::cout << s << std::endl; 
		};      //这里加分号`;`其实和`}`无关系,`;`相当于一条空语句
	}
}
原文地址:https://www.cnblogs.com/LFVH-Coding/p/14327733.html