C++学习1——英文环境学习

找到资源网站 C++ reference(网址:en.cppreference.com)

Language

        Basic concepts

        declaration, translation, main function, keywords, identifiers, comments, escape sequences

        objects, references, structured bindings, functions, enumerators, types, templates, template specializations, namespaces, parameter packs, statements, expressions, name lookup, non-static data members.

        Keywords

        these keywords are not available for re-definition or overloading.

        alignas, alignof, and, and_eq, asm, atomic_cancel, atomic_commit, atomic_noexcept, auto,         bitand, bitor, bool, break, case, catch, char, char8_t, char16_t, char32_t, class, compl,         concept, const, consteval, constexpr, constinit, const_cast, cotinue, co_await, co_return,         co_yield, decltype, default, delete, do, double, dynamic_cast, else, num, 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, reflexpr, register,         reinterpret_cast, requires, return, short, signed, sizeof, static, static_assert, static_cast,         struct, switch, synchronized, template, this, thread_local, throw, true,try, typedef, typeid,         typename, union, unsigned, using, virtual, void, volatile, wchar_t, while, xor, xor_eq

        Preprocessor

        The result of preprocessing is a single file which is then passed to the actual compiler.

        format as follos:

        # character 

        preprocessing instruction ( one of define, undef, include, if, ifdef, else, elif, endif, line, error, pragma)

        line break 

#define EMPTY
EMPTY   # include<file.h> //not a preprocessing directive

        Capbilities

        conditionally  compile of parts of source file (controlled by directive #if, #ifdef, #ifndef, #else, #elif and #endif)

        replace text macros while possibly concatenating or quoting identifiers ( controlled by directives #define and #undef, and operators # and ##)

        include other files (controlled by directive  #include and checked with  has_include

        cause an error (controlled by #error)

        The following aspects of the preprocessor  can be controlled:

                implementation defined behavior (controlled by directive #pragma and operator _Pragma. In addition, some compilers support t(to varying degrees) the operator _Pragma as a non-standard extension.

                file name and line information avaliable to the preprocessor (controlled by directive #line)

        Expressions 

        An expression is a sequence of opereators and their operands, that specifies a computation. Each C++ expression is characterized by two independent properties: A type and a value category.

        value categories; order of evaluation 

        Operators; Conversions; Memory allocation; Other

        Primary expressions (Literals, Id-expressions, Lambada-expressions, Fold-expressions, Requires-expressions); Literals ( integer literals, character literals, floating-point literals, string literals, boolean literals, nullptr, user-defined literals); Unevaluated expressions;Discard expressions.

        Declarations

               Declarations introduce names into the C++ program. A declaration is one of the following:

                Function definition; Template declaration; Explicit template instantiation; Explicit template specialization; Namespace definition; Linkage specification; Attribute declaration; Empty declaration; A function declaration without a decl-specifier-seq; block declaration

        Initialization

        Initization of a variable provides its initial value at the time of construction.

        Non-local variables; ( static initialization, Dynamic initialization)

经过一番学习,感想是优点在于懂得了并深刻理解了很多词汇深层次的意思,但是缺点就是感觉没有学到除了单词之外的其他东西。当然缺点也有可能是因为目前还没有学到很多与以前不同的知识所致。

        

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

王辞夜

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值