Skip to content

Commit 3689673

Browse files
committed
Update C++.md
Fixed Numbered Listing..
1 parent b5240be commit 3689673

1 file changed

Lines changed: 44 additions & 44 deletions

File tree

docs/Language/C++/C++.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -70,74 +70,74 @@ Each release has aimed to enhance the language's expressiveness, safety, and per
7070

7171
Using C++ involves several steps, from setting up your development environment to writing, compiling, and running your code. Here's a step-by-step guide to get you started:
7272

73-
1. ### Install a C++ Compiler
73+
1. **Install a C++ Compiler**
7474

75-
You'll need a C++ compiler to translate your source code into machine code. Popular compilers include:
75+
You'll need a C++ compiler to translate your source code into machine code. Popular compilers include:
7676

77-
- GCC (GNU Compiler Collection): Common on Unix-like systems.
78-
- Visual C++ Compiler: Included with Visual Studio on Windows.
79-
- Clang: Another open-source compiler available on multiple platforms.
80-
81-
The compiler you choose will need to be based on your operating system and preferences.
77+
- GCC (GNU Compiler Collection): Common on Unix-like systems.
78+
- Visual C++ Compiler: Included with Visual Studio on Windows.
79+
- Clang: Another open-source compiler available on multiple platforms.
80+
81+
The compiler you choose will need to be based on your operating system and preferences.
8282

83-
2. ### Choose an Integrated Development Environment (IDE)
83+
2. **Choose an Integrated Development Environment (IDE)**
8484

85-
You'll then need to select an IDE or a text editor to write your C++ code. Some popular options include:
85+
You'll then need to select an IDE or a text editor to write your C++ code. Some popular options include:
8686

87-
- Visual Studio: A powerful IDE available on Windows with excellent C++ support.
88-
- Code::Blocks: An open-source, cross-platform IDE.
89-
- Eclipse: A versatile IDE that supports C++ development.
90-
- Visual Studio Code: A lightweight and extensible code editor with C++ support.
87+
- Visual Studio: A powerful IDE available on Windows with excellent C++ support.
88+
- Code::Blocks: An open-source, cross-platform IDE.
89+
- Eclipse: A versatile IDE that supports C++ development.
90+
- Visual Studio Code: A lightweight and extensible code editor with C++ support.
9191

92-
3. ### Write C++ Code
92+
3. **Write C++ Code**
9393

94-
Simply create a new C++ source file (typically with a .cpp extension) using your chosen IDE or text editor, and write your C++ code using the C++ syntax and features!
94+
Simply create a new C++ source file (typically with a .cpp extension) using your chosen IDE or text editor, and write your C++ code using the C++ syntax and features!
9595

96-
Here's a simple "Hello, World!" program:
96+
Here's a simple "Hello, World!" program:
9797

98-
{: .code }
99-
```cpp
100-
#include <iostream>
98+
{: .code }
99+
```cpp
100+
#include <iostream>
101101

102-
int main()
103-
{
104-
std::cout << "Hello, World!" << std::endl;
105-
return 42069;
106-
}
107-
```
102+
int main()
103+
{
104+
std::cout << "Hello, World!" << std::endl;
105+
return 42069;
106+
}
107+
```
108108

109-
4. ### Save
109+
4. **Save**
110110

111-
Save your C++ code with a meaningful filename and the .cpp extension.
111+
Save your C++ code with a meaningful filename and the .cpp extension.
112112

113-
5. ### Compile
113+
5. **Compile**
114114

115-
Use the command-line interface or the IDE to compile your C++ code, using GCC:
115+
Use the command-line interface or the IDE to compile your C++ code, using GCC:
116116

117-
{: .code }
118-
```bash
119-
g++ your_program.cpp -o your_program
120-
```
117+
{: .code }
118+
```bash
119+
g++ your_program.cpp -o your_program
120+
```
121121

122-
This command will compile your code (your_program.cpp) and generate an executable named `your_program`.
122+
This command will compile your code (your_program.cpp) and generate an executable named `your_program`.
123123

124-
6. ### Run The Program:
124+
6. **Run The Program:**
125125

126-
Execute the compiled program!
126+
Execute the compiled program!
127127

128-
- On the command line:
129-
- `./your_program` (Unix-like systems)
130-
- `your_program.exe` (Windows)
128+
- On the command line:
129+
- `./your_program` (Unix-like systems)
130+
- `your_program.exe` (Windows)
131131

132-
In the IDE, there's also usually a "Run" or "Debug" button. In Visual Studio, you can press `F5` to build.
132+
In the IDE, there's also usually a "Run" or "Debug" button. In Visual Studio, you can press `F5` to build.
133133
134-
7. ### Debugging
134+
7. **Debugging**
135135
136-
Use the debugging features provided by your IDE or compiler to identify and fix errors in your code. Common debugging techniques include setting breakpoints, inspecting variables, and stepping through code. The methods in which you do this will vary between tools.
136+
Use the debugging features provided by your IDE or compiler to identify and fix errors in your code. Common debugging techniques include setting breakpoints, inspecting variables, and stepping through code. The methods in which you do this will vary between tools.
137137
138-
8. ### Learn and Experiment:
138+
8. **Learn and Experiment:**
139139
140-
Explore C++ features, syntax, and libraries. Experiment with different code examples and gradually tackle more complex projects. Online resources, tutorials, and C++ documentation can be valuable references.
140+
Explore C++ features, syntax, and libraries. Experiment with different code examples and gradually tackle more complex projects. Online resources, tutorials, and C++ documentation can be valuable references.
141141
142142
---
143143

0 commit comments

Comments
 (0)