1. #include
#include
using namespace std;
const num=100;
string ct[num][num];
这个你要知道每个维度有多大。
2. 你是想把二维变成一维的话,用string temp=ct[0][0].append(ct[0][index]), 最
后就是你想要的那一行的合成吧。
3. 不全是吧。C里面的string最后一个是\
null,c++里面是string class的一个对象。如果想从c++转c的string,
#include
temp.cstr()是做这个的。如果要把char *变成c++ string,#include
sstream ss; ss>>temp;a=temp.str()就好了。
我觉得还是python好用,用python没那么麻烦