Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/softchris/cpp-snippets
Snippets for C++
https://github.com/softchris/cpp-snippets
Last synced: 16 days ago
JSON representation
Snippets for C++
- Host: GitHub
- URL: https://github.com/softchris/cpp-snippets
- Owner: softchris
- License: mit
- Created: 2021-11-08T12:50:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-15T14:00:28.000Z (almost 3 years ago)
- Last Synced: 2024-10-07T13:22:45.819Z (about 1 month ago)
- Size: 32.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cpp-snippets
This is an extension meant to give you some awesome C++ snippets
## Contact
If you find issues please report them on the GitHub repo.
If you have any comments like feature requests or feedback on theses snippets please contact me on Twitter at [chris_noring](https://twitter.com/chris_noring).
Remember these snippets are for all of you, so if you feel that they could be even better, don't hesitate to let me know :)
/Chris
## Features
A collection of C++ snippets
The following commands are available:
- `cpp-class-declare`, declares a class.
- `cpp-class-sample`, declares a class, implements it.
- `cpp-for`, declare a for loop.
- `cpp-foreach`, declare a for each loop.
- `cpp-if`, declare an if-clause.
- `cpp-if-else-if-else`, declare a clause with an if, else if and else clause.
- `cpp-if-else`, declare a clause with an if and an else.
- `cpp-function`, shows how to declare a function.
- `cpp-function-int`, shows how to declare a function returning an int.
- `cpp-function-string`, shows how to declare a function returning a string.
- `cpp-iostream-input-line`, shows how to read full line user input.
- `cpp-iostream-input-multiple`, show how to read multiple inputs, separated by space.
- `cpp-iostream-input`, shows how to read one input.
- `cpp-iostream-print`, shows how to print to the console.
- `cpp-app-sample`, shows how to create a sample app in C++.
- `cpp-use-namespace`, shows how to add a namespace.
- `cpp-use-namespace-std`, shows how to add the 'std' namespace.
- `cpp-lib-string`, shows how to add the string lib.
- `cpp-lib-iostream`, shows how to add the iostream lib.
- `cpp-main`, shows how to add main function.
- `cpp-pointer-allocate`, declare a pointer that allocates memory and also deallocates.
- `cpp-pointer-array`, declares a pointer that iterates through an array.
- `cpp-pointer`, declare a pointer that's assigned an address, also dereferencing is shown.
- `cpp-vector-lib`, includes the lib for vector.
- `cpp-vector`, shows how to create a vector instance.
- `cpp-vector-loop-for`, shows how to looop through a vector using a for-loop.
- `cpp-vector-loop-iterator`, shows how to looop through a vector using an iterator.
- `cpp-vector-loop-range`, shows how to loop through a vector using an range based for loop.
- `cpp-struct-declare`, declares a struct.
- `cpp-struct-sample`, shows how to declare and instantiate a struct.
- `cpp-stack`, shows how to declare a stack.
- `cpp-stack-lib`, shows how to import a stack.
- `cpp-queue`, shows how to declare a queue.
- `cpp-queue-lib`, shows how to import a queue.
- `cpp-dowhile`, declare a do while loop.
- `cpp-while`, declare a while loop.## Release Notes
This is the release notes.
### 1.1.1
Added, if, while, for
### 1.0.0
complete, but plans to add things to it gradually. Please suggest in repo issues what you need.
### 0.1.0
First release
## Publisher
Chris Noring
@chris_noring