c ++一般解释q

时间:2012-03-30 02:53:35

标签: c++

这是作业,所以我不想让你给我答案,我只是想知道我的导师要我做什么?

给定下面的字符串指针和变量sz,使用它们动态创建一个大小为sz的数组。

string * sp;
int sz=5;

1 个答案:

答案 0 :(得分:2)

他希望你编写一行代码,动态地将一个指针数组分配给大小为sz的字符串。

string * sp;
int sz = 5;
// put a line of code here that allocates the array
相关问题