In 1993 Alex Stepanov wrote the STL library. The library redefined the way people code in C/C++. Using it gradually became synonymous with elegance and speed. Later, as STL fought its way into the standards, it became even more popular and the numbers of people who used it increased exponentially. In the first two parts of this article series I presented the basics of STL; in this third part I will show you more complex code. You’ll also learn how to write an expression evaluator/compiler.
Dijkstra`s Shunting Algorithm with STL and C++ - Epilogue (Page 4 of 4 )
And here is the code source within which I have covered all of this. It was written and compiled using Visual Studio 2005 SP1, so the project will work only with that specific version or any later on. However, if you re-make the project files (by creating a new project) you should be able to run it with earlier versions also.
In it you can observe much more interesting information which didn't make it into this article. Feel free to examine the information and try to understand each example. Needless to say, if you are having a hard time comprehending a specific expression please don't hesitate to post in the blog or take a step further and join the friendly, ever-growing forum DevHardware. After you have joined you can post your question, create a topic on it, and discuss your question with the entire community. An answer is guaranteed.
If you manage to assimilate each line of code from the source above, that clearly means that you have mastered the STL library. But if you want to get to that point you must apply yourself and research, ask questions, and ultimately get answers. Remember there aren't any wrong question, just wrong answers. If you want to get answers you need to ask questions.
Now that we are at the end of this three-part saga I hope you gained a good grasp of STL. You should be able to use it and understand how it works. As a bonus, whenever you need to write an expression evaluator or even a compiler for code you should already know from where to start and where to finish. Congratulations for sticking with me through all three parts and I wish you a great year!
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.