简体   繁体   English

用STL解决C ++中的问题

[英]Problem solving in C++ with STL

I am preparing for a programming competition in witch we solve programming problems in c++. 我正准备参加一个编程竞赛,我们用c ++来解决编程问题。

Looking at the former year solutions, they seem quite easy (not more than ~30 lines of code). 看看前一年的解决方案,它们看起来很简单(不超过30行代码)。 I realised that they are widely using the STL for easy manipulating - vectors, sets, maps, lists and also the algorithms available in STL. 我意识到他们广泛使用STL来轻松操作 - 矢量,集合,地图,列表以及STL中可用的算法。

Any site for beginners like me who want to learn the features of STL and its use in solving problems ? 像我这样的初学者想要学习STL的功能及其在解决问题中使用的网站吗?

Thank you in advance. 先感谢您。

想到两本书:Josuttis的C ++标准库 (以及他的页面 )和Meyers的Effective STL

As well as Scott Meyer's excellent book "Effective STL" which has been recommended above, I can't recommend highly enough the excellent book Accelerated C++ by Andrew Koenig and Barbara E. Moo. 除了上面推荐的Scott Meyer的优秀书籍“Effective STL”之外,我还不能高度推荐Andrew Koenig和Barbara E. Moo的优秀书籍Accelerated C ++

The book starts by having you use STL very early in the book explaining their uses in the context of initially simple problems. 本书首先让您在本书的早期使用STL来解释它们在最初简单问题的背景下的用法。 This book treats C++ as its own language and not as C with bits bolted on, the mechanics of defining a class aren't explained until later in the book. 本书将C ++视为自己的语言,而不是像C一样用螺栓固定,定义类的机制直到本书后面才解释。

如果你有一些非STL C ++的概念,并且特别需要了解STL的方法如何与非STL方法相对应,我推荐本教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM