程序员应该使用STL还是编写自己的代码? [英] Should programmers use STL or write their own code?

查看:74
本文介绍了程序员应该使用STL还是编写自己的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对C ++数据结构了解不多,但是我想知道您(程序员)使用STL还是编写自己的代码?毕竟,STL旨在执行诸如搜索,替换以及通过数据列表进行更多操作之类的任务.

I don't know much about C++ data structures but I am wondering do you (programmers) use STL or write your own code? After all STL is designed for doing tasks like searching, replacing and much more through a list of data.

因为我可以使用STL,所以确实不需要真正了解链接列表,二进制搜索等等.您会提出什么建议?

Someone really don't need to learn much about the linked list, binary search and many more because I could use STL. What would you suggest?

推荐答案

您应该使用STL,因为它已经过测试和优化.

You should use STL, because it is well tested and optimized.

这并不意味着您不应该自己知道如何编写这些数据结构.有了这种能力,您将能够为您的应用选择最佳的STL数据结构.

That doesn't mean you shouldn't know how to write these data structures yourself. With that ability under your belt, you will be able to choose the best STL data structure for your application.

这篇关于程序员应该使用STL还是编写自己的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆