如何在Ada中创建动态分配的数组? [英] How to create a dynamically allocated array in Ada?
本文介绍了如何在Ada中创建动态分配的数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
正如问题所述,我想在Ada中创建一个动态分配的数组。像C ++ std :: vector
之类的东西,即,我不想将数组的长度存储在单独的变量中,就像完成此处。由于Ada支持泛型,是否可以在Ada中创建 std :: vector
之类的功能?
As the questions says, I want to create a dynamically allocated array in Ada. Something like C++ std::vector
ie., I don't want to store the length of the array in a separate variable like it is done here. As Ada supports generics, is it possible to create a std::vector
like functionality in Ada?
推荐答案
标准库包括 Ada.Containers.Vectors
( RM A.18.2 )
这篇关于如何在Ada中创建动态分配的数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文