--- title: "Selection Statements (C++) | Microsoft Docs" ms.custom: "index-page" ms.date: "11/04/2016" ms.technology: ["cpp-language"] ms.topic: "language-reference" dev_langs: ["C++"] helpviewer_keywords: ["selection statements [C++], syntax", "selection statements"] ms.assetid: 2ce662fc-5e62-461b-ac31-2c159d8ef33b author: "mikeblome" ms.author: "mblome" ms.workload: ["cplusplus"] --- # Selection Statements (C++) The C++ selection statements, [if](../cpp/if-else-statement-cpp.md) and [switch](../cpp/switch-statement-cpp.md), provide a means to conditionally execute sections of code. The [__if_exists](../cpp/if-exists-statement.md) and [__if_not_exists](../cpp/if-not-exists-statement.md) statements allow you to conditionally include code depending on the existence of a symbol. See the individual topics for the syntax for each statement. ## See Also [Overview of C++ Statements](../cpp/overview-of-cpp-statements.md)