Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/addleonel/cpp-fundamentals
C/C++ fundamentals topics
https://github.com/addleonel/cpp-fundamentals
basics c cpp fundamentals
Last synced: about 2 months ago
JSON representation
C/C++ fundamentals topics
- Host: GitHub
- URL: https://github.com/addleonel/cpp-fundamentals
- Owner: addleonel
- License: mit
- Created: 2021-08-04T22:41:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-28T16:08:22.000Z (over 2 years ago)
- Last Synced: 2023-03-05T03:56:30.215Z (almost 2 years ago)
- Topics: basics, c, cpp, fundamentals
- Language: C++
- Homepage:
- Size: 449 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## C++ Fundamentals
> C++ is a general-purpose programming language, is considered as "C" with classes. C++ has object-oriented, generic, functional features in addition to facilities for low-level memory manipulation.
### IDEs and Code Editors for C++
- code::Blocks
- Eclipse
- Microsoft Visual Studio
- VSCode
- CodeLite
- Geany
- Vim, etc.### Compilers
|Compiler|Platform|Command|
|--------|--------|-------|
|**[GCC](https://gcc.gnu.org/) (GNU Compiler Collection)** this is most used for C | Linux | `gcc file.c -o file.out` |
|**[G++](https://gcc.gnu.org/)** this is appropriated for c++ | Linux | `g++ file.cc -o file.out` |
|**[Microsoft Visual C++ (MSVC) compiler](https://code.visualstudio.com/docs/cpp/config-msvc)**| Microsoft | `cl file.cc`|#### How compilers work
`source code -> compiler -> Machine Language`
From the following source code (called helloWorld.cpp)
```cpp
#includeint main() {
// How to print "Hello World"
std::cout << "Hello World\n";
return 0;
}
```
We need to compile (`g++` helps us to do this)```
g++ helloWorld.cpp -o helloWorld
```Above create an executable file (in this case `helloWorld`). To run this we need to execute the file as follows:
```
./helloWorld
```This prints in console `Hello World`