Is “else if” a single keyword?

后端 未结 8 1986
忘了有多久
忘了有多久 2021-01-31 01:13

I am new to C++. I often see conditional statement like below:

if 
  statement_0;
else if
  statement_1;

Question:

Syntacticall

8条回答
  •  终归单人心
    2021-01-31 01:36

    No, it is not.
    They are two keywords and, moreover, the second "if" is a substatement "inside" the scope determined by the first "else" statement.

提交回复
热议问题