Skip to content

Fix typo #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/cpp/switch-statement-cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int main() {

In the above example, `capa` is incremented if `c` is an uppercase `A`. The `break` statement after `capa++` terminates execution of the `switch` statement body and control passes to the `while` loop. Without the `break` statement, execution would "fall through" to the next labeled statement, so that `lettera` and `nota` would also be incremented. A similar purpose is served by the `break` statement for `case 'a'`. If `c` is a lowercase `a`, `lettera` is incremented and the `break` statement terminates the `switch` statement body. If `c` is not an `a` or `A`, the `default` statement is executed.

**Visual Studio 2017 and later:** (available with [/std:c++17](../build/reference/std-specify-language-standard-version.md)) The `[[fallthrough]]` attribute is specified in the C++17 standard. It can be used in a `switch` statement as a hint to the compiler (or to anyone reading the code) that fall-through behavior is intended. The Visual C++ compiler currently does not warn on fallthrough behavior, so this attribute has no effect compiler behavior. Note that the attribute is applied to an empty statement within the labeled statement; in other words the semicolon is necessary.
**Visual Studio 2017 and later:** (available with [/std:c++17](../build/reference/std-specify-language-standard-version.md)) The `[[fallthrough]]` attribute is specified in the C++17 standard. It can be used in a `switch` statement as a hint to the compiler (or to anyone reading the code) that fall-through behavior is intended. The Visual C++ compiler currently does not warn on fallthrough behavior, so this attribute has no effect on compiler behavior. Note that the attribute is applied to an empty statement within the labeled statement; in other words the semicolon is necessary.

```cpp
int main()
Expand Down Expand Up @@ -160,4 +160,4 @@ int main(int argc, char *argv[])
## See Also
[Selection Statements](../cpp/selection-statements-cpp.md)
[Keywords](../cpp/keywords-cpp.md)