Skip to content

Commit

Permalink
add more notes in c++
Browse files Browse the repository at this point in the history
  • Loading branch information
kekeandzeyu committed Oct 3, 2024
1 parent 52e8866 commit 8753b23
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ If someone's original work is used but not mentioned, or being misused, either w

4. CS61A: Structure and Interpretation of Computer Programs (UC Berkeley) by Professor John DeNero and the rest of CS61A staff.

5. <https://en.wikipedia.org/wiki/Namespace>.
5. <https://en.wikipedia.org/wiki/Standard_Template_Library>.

6. <https://en.cppreference.com/w/>.
6. <https://learn.microsoft.com/en-us/cpp/standard-library/cpp-standard-library-overview?view=msvc-170>.

7. <https://en.wikipedia.org/wiki/C%2B%2B_Standard_Library>.

8. <https://en.wikipedia.org/wiki/Namespace>.

9. <https://en.cppreference.com/w/>.

> Note: Content of CS61A and CS61B are partly used for the Object-Oriented part.
Expand Down
33 changes: 33 additions & 0 deletions Writerside/topics/C-Programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,41 @@ std::vector&lt;int&gt; v1(3, 10) // v1 = {10, 10, 10}
std::vector&lt;int&gt; v2{3, 10} // v2 = {3, 10}
</code-block>

#### 5.5 using

<p>Create type aliases with the using keyword.</p>

<compare type="top-bottom" first-title="Types" second-title="Using keyword">
<code-block lang="c++">
std::pair&lt;bool, std::pair&lt;double, double&gt;&gt;;
</code-block>
<code-block lang="c++">
using Zeros = std::pair&lt;double, double&gt;;
using Solution = std::pair&lt;bool, Zeros&gt;;
</code-block>
</compare>

## &#8545; Standard Template Library (STL)

<p>The <format color="DarkOrange">Standard Template Library (STL)
</format> is a software library originally designed by Alexander Stepanov
for the C++ programming language that influenced many parts of the C++
Standard Library. It provides four components called algorithms,
containers, functions, and iterators.</p>

<p>The <format color="DarkOrange">C++ Standard Library</format> is a
collection of classes and functions, which are written in the core
language and part of the C++ ISO Standard itself.</p>

<note>
<p>The STL and the C++ Standard Library are two distinct entities.</p>
<p>However, due to the popular use of "STL" and "Standard Template
Library" in search engines, we occasionally use those names to make it
easier to find our documentation.</p>
<p>In this documentation, Standard Template Library (STL) refers to the
C++ Standard Library as a whole.</p>
</note>

### 6 Containers

#### 6.1 Sequence Containers
Expand Down

0 comments on commit 8753b23

Please sign in to comment.