我正在为翻译程序编写程序。现在,我正在编写一个单词类,如下所示,我在编写返回句子中所有带有撇号的单词的方法时遇到了麻烦。在 bool Words::isApostophePresent(){ 之后我应该写什么
如果(.....)
Words::Words() {}
string Words::getWord(){
return word;
}
void Words::setWord(string w){
word=w;
}
int Words::getNumCharacters(){
return word.length();
}
vector<char> Words::getCharacters(){
int numChars=word.length();
for (int i=0;i<numChars;i++){
characters.push_back(word[i]);
}
return characters;
}
bool Words::isFirstCharacterUppercase(){
if(isupper(word[0])){
firstCharacterUppercase=1;
}
else {
firstCharacterUppercase=0;
}
return firstCharacterUppercase;
}
bool Words::isApostophePresent(){
if()
}
Words::~Words(){}