forked from fork-commit-merge/fork-commit-merge-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCPPLanguage.tsx
60 lines (56 loc) · 2.24 KB
/
CPPLanguage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* eslint-disable @next/next/no-img-element */
const CPPLanguage = () => {
return (
<div className="flex justify-center items-center bg-primary">
<div className="text-center max-w-2xl">
<div className="flex flex-wrap justify-center items-center">
<img
src="https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge&logo=c%2B%2B&logoColor=white"
alt="C++"
className="mb-10 h-16 rounded-sm"
/>
</div>
<h2 className="text-2xl font-bold mb-4">What is C++?</h2>
<p className="mb-4">
C++ is a general-purpose programming language created as an extension
of the C programming language. Developed by Bjarne Stroustrup in 1983,
C++ includes features like classes, inheritance, and polymorphism,
effectively adding object-oriented capabilities to C.
</p>
<h2 className="text-2xl font-bold mb-4">Why Use C++?</h2>
<p className="mb-6">
C++ offers a blend of high- and low-level language features, enabling
both system-level memory manipulation and abstract object-oriented
programming. It is widely used in system software, game development,
embedded systems, and performance-critical applications.
</p>
<h4 className="text-2xl font-bold my-4">
C++ Best Practices and Coding Style Guide
</h4>
<ul>
<li>
- Use RAII (Resource Acquisition Is Initialization) for resource
management.
</li>
<li>- Prefer `std::vector` and `std::array` over C-style arrays.</li>
<li>- Make use of the Standard Template Library (STL).</li>
<li>- Use `nullptr` instead of `NULL` or `0` for pointers.</li>
<li>
- Always include proper header guards and prefer `#pragma once` if
supported.
</li>
</ul>
<br />
<a
target="_blank"
rel="noopener noreferrer"
href="https://en.cppreference.com/w/cpp/header"
className="text-xl font-bold underline hover:text-blue-400"
>
C++ Standard Library - Documentation
</a>
</div>
</div>
);
};
export default CPPLanguage;