在字符串类string中实现一个判断函数,该函数功能是统计某一字符串类对象(仅有单词和空格组成)有多少个单词,同时保存所有单词在字符串中的起始地址(设该字符串不超过100个单词)
#include ﹤iostream.h﹥
#include ﹤string﹥
class str{
string s; int n, a[100], j, l;
public: str(string &a){s=a; n=0; j=0; l=0;}
....test(....);
int *geta( ){return a;}
};
请写出test函数的过程(如果需要形式参数,请给出形参类型和数量,以及返回值类型)
订单号:
遇到问题请联系在线客服
订单号:
遇到问题请联系在线客服