Python列表等价于C ++?

编程入门 行业动态 更新时间:2024-10-23 19:23:40
本文介绍了Python列表等价于C ++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你能告诉我什么是最接近的数据类型在C ++到python列表?如果没有类似的,你将如何在C ++中构建它?

Could you please tell me what is the closest data type in C++ to python list? If there is nothing similar, how would you build it in C++?

推荐答案

std :: vector s, std :: list 和数组(或 std :: array s)都有类似于Python列表的功能。您要选择的数据结构取决于您的要求。

std::vectors, std::lists, and arrays (or std::arrays) all have features similar to Python lists. Which data structure you want to choose depends on your requirements.

更多推荐

Python列表等价于C ++?

本文发布于:2023-11-09 15:41:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572762.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:列表   Python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!