So if you are looking forward to learn C++ in 2019, I present to you the 30 Seconds of C++.
A collection of STL (Standard Template Library) features of C++ which can be learned in 30 seconds or less.
Bhupesh-V / 30-seconds-of-cpp
30 Seconds of C++ (STL in C++). Read More about 30C++ here ๐
30 Seconds of C++
30 Seconds Of Standard Template Library in C++
A collection of C++ STL features (functions/libraries) which can be learned in 30 seconds or less
Header Files
- algorithm โจ
- list ๐
- map ๐บ๏ธ
- queue ๐ต
- set โก
- stack ๐
- unordered_map ๐บ๏ธ
-
vector
โ๏ธ
Algorithm
View contents
accumulate
adjacent_difference
adjacent_find
all_of
any_of
binary_search
clamp
copy
copy_backward
copy_if
copy_n
count
count_if
equal
equal_range
fill
fill_n
find
find_first_of
find_if
find_if_not
for_each
for_each_n
generate
includes
iota
is_heap
is_permutation
is_sorted
iter_swap
lexicographical_compare
linear_search
lower_bound
make_heap
max
max_element
merge
min
min_element
minimax_element
minmax
minmax_element
mismatch
move
next_permutation
none_of
nth_element
partition
pop_heap
prev_permutation
push_heap
random_shuffle
remove
remove_copy
remove_copy_if
remove_if
replace
replace_copy
replace_copy_if
replace_if
reverse
reverse_copy
rotate
search
search_n
set_difference
set_intersection
set_union
shuffle
sort
stable_sort
swap
transform
transform_reduce
unique
upper_bound
List
What is it again? ๐ง
30 Seconds of C++ (hereafter referred to as 30C++) is a collection of modern C++ STL features like algorithms, containers, etc combined into short C++ snippets that can be learned in 30 seconds or less.
Inspired by the 30 Seconds of Code
Why did you make it? ๐ฎ
I personally find it hard to learn modern C++ (C++ 14,17) through numerous C++ tutorials which either have incomplete info or if you wanna go further you may find yourself browsing these websites for modern C++
The problem with the above 2 resources is that they sometimes give too much info overshadowing the simple things to understand and from a perspective of a "beginner" who has just started learning that can be frustrating.
Although both these resources are damn good if you have a basic understanding which 30C++ can give.
Why would I learn C++? ๐
No doubt languages like JavaScript, Python, Java are ruling the programming world currently but the undoubted presence of C++ in the top 10 languages prove that C++ is evergreen and its presence will never diminish.
Check out these blogs for detailed comparisons :
- 8 Top Programming Languages & Frameworks of 2019
- Top 10 Programming Languages of the World โ 2019 to begin withโฆ
- 10 Best Programming Languages to Learn in 2019 (for Job & Future)
- How long will C++ be around?
- Also, check out this article about some market trends You can conclude from the above post that C++ is in the Top 3 skills required at Google.
Although to not break your bubble C++ takes a ton of time to master & feel its true essence. (figuring out myself)
I myself use Python as my main language but over the years C++ has helped me become a better developer, even if you are new to programming, using C++ as your starter language will be a good choice.
Even if you're not learning C++ from Job point of view, it offers a ton of learning experience.
See 5 Reasons Why You Should Keep Learning C/C++
More Resources
Here are some of the resources (blogs) which I currently follow :
PS: avoid these if you are very new to C++
- foonathan::blog()
- Fluent C++
- Simplify C++
- Bartek's Coding Blog
- Kenny Kerr
- Sutterโs Mill
- thoughts on cpp
- Vorbrodt's C++ Blog
- Learning C++
How will it help me? ๐ค
- 30C++ includes all the modern C++ features & more of them are coming day by day.
- It can help you learn modern C++ step by step without browsing through any lousy and confusing documentation.
-
Currently, some of the library headers available are :
<algorithm>
<list>
<stack>
<queue>
<vector>
Also learning modern C++ will surely help if you are seeking a professional career in C++.
If you are a CS Student then learning C++ will be surely helpful, Why CS students must learn C++ as their main programming language
All the Snippets are explained in an easy to understand lucid manner with a link to run the example code.
-
As quoted by Bartlomiej Filipek
I am not saying that C++ is fantastic and you should abandon everything and just stick to it. If youโre just starting itโs good to have more options and learn different things. Even if youโre a C++ guy already, itโs vital to learn something new and improve.
30 Seconds of Knowledge ๐จ๐ฝโ๐ป
If you are lazy(like me) you can also learn C++ and experience 30C++ on your browser by adding this awesome web extension to your favorite browser built by Stefan Petrovic.
Know more about 30 Seconds of Knowledge
Weekly Series Announcement
So with the help of 30C++, we will be learning together modern C++ through a series of C++ blogs that I will be posting starting soon.
Contribute ๐
If you would like to contribute check out some of the open issues :
Add new methods in different header directories #31
This is for first-time-contributors :
Add functions which belong to a particular header file in its corresponding .md file inside the header
folder.
For example
std::sort belongs to algorithm
header file, so make a new file sort.md
inside the algorithm
directory while maintaining the CONTIBUTING guidelines and formats.
See todo.txt
file in different header directory to see which of the methods have not been implemented yet.
Add Run Code Links in existing code snippets #36
Add Runnable links of the code below the example. Use link name Run Code which links to a Online C++ complier conatining the example code. Use Rextester as the Online C++ Compiler (If you have a better suggesstion please comment).
Follow below steps to generate the Run Code Link.
- Go to Rextester
- Copy or write the example code.
- Run the code (hit F8) , see if you face any problems
- Save the code with the followng title format
<algo_name>_30-Seconds-of-C++
- A permanent link will be generated , copy that
- Submit a PR which contains the Run Code Link just below the example.
Comment any doubts, suggesstions.
develop weekly newsletter #38
Develop a weekly newsletter for sending random code snippets to subscribers.
https://app.leanboard.io/board/a7721e60-20e7-4352-b365-8bc725ed7c2a
Feedback ๐ค
If you like to suggest anything please open an issue or comment below.
Also don't forget to Checkout my website for more blogs.
Logo & Cover Image by: Shriam Kaushik
Top comments (27)
Nice to see other people doing C++ around!
Thanks ๐๐
I was actually kinda motivated by your posts on C++ too . ๐
There's def a big lack of of C++ on this site for sure lol
So many students get C++-traumatized due to the fact that C++ is still being taught in schools with C++98.
Yes
Because as i said it's sometimes not beginner friendly and students get a bad first impression of C++
I mean just look how much C++ created
That JavaScript V8 engine ๐
Pretty much every language that isn't C or C++ is built upon a C or C++ stack these days lol
Say JVM for example ๐
I love this post. Great post and great to see some C++ love here. This site definitely needs more of it.
The biggest issue with people being afraid of C++ is honestly how it's taught in my mind. Universities have taught it completely wrong, introduce concepts wrong, and don't even teach proper C++. They teach it like it is just "C with classes." A lot of universities even teach that using the STL is bad and that it's slow and want you to go back to using it like it's C. I was told by a systems professor a few times that C++ could not be used in this class because it was impossible for C++ to do the things that were required (he was wrong of course...).
C++ was my first language and it is still my baby even though it is not my main language anymore. I sometimes still go back to c++ to make sure I still remember how to do a few things and brush up on modern C++. It definitely has made me a better overall developer.
I totally feel you
there is one misconception that STL is slow, it's NOT
Instead it increases the productivity of the language
I find reading โThe C++ Programming Languageโ by Bjarne Stroustrup (original C++ creator) is one best ways of learning C++.
Yes, itโs a deep long read but you reap the rewards several times over.
He explains tough concepts in a simple way with a plethora of examples.
Thanks! I'm learning C++ to help support one of our components at work (I'm using this tutorial) and I'm finding the the more I learn the better I understand what goes on "under the hood" in the order languages in using.
This will definitely come in handy!
Sure happy to help ๐ค
I think learncpp.com skipped the modern C++ STL features.
I started programming with Microsoft QuickC (which should make it clear how old I am) and then tried to go further with it. Left me a little bruised and battered but have always wanted to come back to C and/or C++, so thanks for sharing!
Seriously ๐คฏ
I guess I could learn from you
omg, not at all. I'm learning from you!
C was a tough first experience for me. still get anxiety every time I see an asterisk!!!!
Started college with a CSCI class that taught computer science principles in C++. I can confirm that C++ is not beginner friendly, but if you can push through, any other language will feel like a breeze!
Migrating from Java to C++ at work. Did some of it back in college, now I gotta get my hands dirty everyday with some C++. Excited and anxious also.
God bless
You to brother
๐คโบ๏ธโบ๏ธ
Great post. I started out in C++, and even though I don't regularly use it in my work today, it helped me tremendously when moving on to other languages.
Yes !!! Finally someone agrees
It's totally true
๐๐
From a guy who built a 3D Bomberman OpenGl game in C++, all I can say is... "IT'S WORTH IT".
Thanks ๐โบ๏ธ
I would try to keep up ma pace ๐
Some comments may only be visible to logged-in visitors. Sign in to view all comments.