Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //это вставить где нибудь в начале программы и вне мейна
- const char* keyword[] = {
- "alignas" ,
- "alignof" ,
- "and" ,
- "and_eq" ,
- "asm" ,
- "auto" ,
- "bitand" ,
- "bitor" ,
- "bool" ,
- "break" ,
- "case" ,
- "catch" ,
- "char" ,
- "char8_t" ,
- "char16_t" ,
- "char32_t" ,
- "class" ,
- "compl" ,
- "concept" ,
- "const" ,
- "const_cast" ,
- "consteval" ,
- "constexpr" ,
- "constinit" ,
- "continue" ,
- "co_await" ,
- "co_return" ,
- "co_yield" ,
- "decltype" ,
- "default" ,
- "delete" ,
- "do" ,
- "double" ,
- "dynamic_cast" ,
- "else" ,
- "enum" ,
- "explicit" ,
- "export" ,
- "extern" ,
- "false" ,
- "float" ,
- "for" ,
- "friend" ,
- "goto" ,
- "if" ,
- "inline" ,
- "int" ,
- "long" ,
- "mutable" ,
- "namespace" ,
- "new" ,
- "noexcept" ,
- "not" ,
- "not_eq" ,
- "nullptr" ,
- "operator" ,
- "or" ,
- "or_eq" ,
- "private" ,
- "protected" ,
- "public" ,
- "register reinterpret_cast" ,
- "requires" ,
- "return" ,
- "short" ,
- "signed" ,
- "sizeof" ,
- "static" ,
- "static_assert" ,
- "static_cast" ,
- "struct" ,
- "switch" ,
- "template" ,
- "this" ,
- "thread_local" ,
- "throw" ,
- "true" ,
- "try" ,
- "typedef" ,
- "typeid" ,
- "typename" ,
- "union" ,
- "unsigned" ,
- "using" ,
- "virtual" ,
- "void" ,
- "volatile" ,
- "wchar_t" ,
- "while" ,
- "xor" ,
- "xor_eq"
- };
- for (int i = 0; i < 91; i++) {
- if (strcmp(Str, keyword[i]) == 0) {
- cout << "bad stroka, keyword. pCh =" << pCh << endl;
- delete[] pCh;
- len = 0;
- pCh = new char[len + 1];
- pCh[0] = '\0';
- return;
- }
- }
- //это вставить к IdentStr(const char* Str)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement