当前位置:网站首页>Variable declarations following if statements
Variable declarations following if statements
2022-07-03 02:52:00 【French red wine sweet】
problem :
An issue came up on another forum and I knew how to fix it, but it revealed a feature of the compiler peculiar to me. There is a problem in another forum , I know how to solve it , But it reveals my unique compiler features .The person was getting the error "Embedded statement cannot be a declaration or labeled statement" because they had a declaration of a variable following an if statement with no brackets. This person received an error message “ Embedded statements cannot be declarative or tagged statements ”, Because they're if There is an parenthesized variable declaration after the statement .That was not their intent, but they had commented out the line of code immediately following the if statement, which made the variable declaration the de facto line of code to execute. This is not their intention , But they are if The code line is commented out immediately after the statement , This makes the variable declaration the line of code to actually execute .Anyway, that's the background, which brings me to this. in any case , This is the background , This reminds me of this .
The following code is illegal The following code is illegal
if (true) int i = 7;However, if you wrap that in brackets, it's all legal. however , If you put it in square brackets , Is completely legal .
if (true){ int i = 7;}Neither piece of code is useful. These two pieces of code are useless .Yet the second one is OK. The second one is ok .What specifically is the explanation for this behavior? What is the specific explanation for this behavior ?
Solution :
Reference resources : https://stackoom.com/en/question/ATTZ边栏推荐
- Mathematical statistics -- Sampling and sampling distribution
- 力扣------网格中的最小路径代价
- Hcip137-147 title + analysis
- Gbase 8C system table PG_ auth_ members
- [fluent] futurebuilder asynchronous programming (futurebuilder construction method | asyncsnapshot asynchronous calculation)
- 为什么会选择框架?选择什么样的框架
- Global and Chinese ammonium dimolybdate market in-depth analysis and prospect risk prediction report 2022 Edition
- Unity3d human skin real time rendering real simulated human skin real time rendering "suggestions collection"
- Two dimensional format array format index subscript continuity problem leads to return JSON format problem
- C language beginner level - pointer explanation - paoding jieniu chapter
猜你喜欢

SQL statement

力扣------网格中的最小路径代价
![ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc](/img/cb/145937a27ef08050a370d5a255215a.jpg)
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc

Yiwen takes you to know ZigBee

TCP 三次握手和四次挥手机制,TCP为什么要三次握手和四次挥手,TCP 连接建立失败处理机制

Xiaodi notes
![ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc](/img/cb/145937a27ef08050a370d5a255215a.jpg)
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc

Practice of traffic recording and playback in vivo

I2C 子系统(四):I2C debug

Check log4j problems using stain analysis
随机推荐
HTB-Devel
The Linux server needs to install the agent software EPS (agent) database
Pytest (6) -fixture (Firmware)
用docker 连接mysql的过程
Gbase 8C system table PG_ amproc
sql server 查詢指定錶的錶結構
Informatics Olympiad one general question bank 1006 a+b questions
What does "where 1=1" mean
MUX VLAN Foundation
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
I2C 子系统(三):I2C Driver
Add MDF database file to SQL Server database, and the error is reported
《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨
Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记
[Hcia]No.15 Vlan间通信
一文带你了解 ZigBee
Hcip137-147 title + analysis
SQL server queries the table structure of the specified table
2022-2028 global splicing display industry research and trend analysis report
Linear rectification function relu and its variants in deep learning activation function