Keywords in C++
Catchphrases are those words whose importance is now characterized by Compiler. These watchwords can't be utilized as an identifier. Note that catchphrases are the accumulation of saved words and predefined identifiers. Predefined identifiers will be identifiers that are characterized by the compiler however can be changed in importance by the client.
For instance, you could proclaim a variable called principle inside your primary capacity, instate it, and after that print out its esteem (however ONLY do that to check that you can!). Then again, you couldn't do this with a variable named else. The thing that matters is that else is a held word, while primary is "just" a predefined identifier.
There are a sum of 95 held words in C++. The held expressions of C++ might be strategically located into a few gatherings. In the primary gathering, we put those that were additionally present in the C programming dialect and have been persisted into C++. There are 32 of these.
There are another 30 saved words that were not in C, are in this way new to C++ programming dialect.
There are 11 C++ saved words that are not fundamental when the standard ASCII character set is being utilized, however they have been added to give meaningful options in contrast to a couple of the C++ administrators, and furthermore to encourage programming with character sets that need characters required by C++.
Here is a rundown of all these saved words:
alignas (since C++11) | double | reinterpret_cast |
alignof (since C++11) | dynamic_cast | requires (since C++20) |
and | else | return |
and_eq | enum | short |
asm | explicit | signed |
atomic_cancel (TM TS) | export(1) | sizeof(1) |
atomic_commit (TM TS) | extern(1) | static |
atomic_noexcept (TM TS) | false | static_assert (since C++11) |
auto(1) | float | static_cast |
bitand | for | struct(1) |
bitor | friend | switch |
bool | goto | synchronized (TM TS) |
break | if | template |
case | import (modules TS) | this |
catch | inline(1) | thread_local (since C++11) |
char | int | throw |
char16_t (since C++11) | long | true |
char32_t (since C++11) | module (modules TS) | try |
class(1) | mutable(1) | typedef |
compl | namespace | typeid |
concept (since C++20) | new | typename |
const | noexcept (since C++11) | union |
constexpr (since C++11) | not | unsigned |
const_cast | not_eq | using(1) |
continue | nullptr (since C++11) | virtual |
co_await (coroutines TS) | operator | void |
co_return (coroutines TS) | or | volatile |
co_yield (coroutines TS) | or_eq | wchar_t |
decltype (since C++11) | private | while |
default(1) | protected | xor |
delete(1) | public | xor_eq |
do | register(2) |
Comments
Post a Comment
If you have any query, please let us know