Is there something wrong with my function arguments?

I wrote a helper function is_vowel for my function countSyllables. All parts of my program are running fine except this portion. The issue is when I run the program the syllable count is way off. Where exactly did I go wrong in my is_vowel argument? And if someone finds the issue can you explain why it's wrong? Thank you.

Last edited on
Also, not sure if this helps, but i created the string tempWord with the intention of temporarily storing one word at a time (from a sentence in main function). I thought in this way I would be able to more accurately count the number of syllables, but that doesn't seem to be the case...

Is there something wrong with my argument?
Could you post your output that you are getting and the results you are expecting?

EDIT: Also, it might be a good idea to learn how to use your debugger; they are perfect for situations like this.
Last edited on
i've only glanced at this, but i dont think you need the "-1" in here:
for (i=0; i < word.size()-1; i++)

or in here:
for (i; i < tempWord.size()-1; i++)
Last edited on
Thank you guys, I've figured it out! As a beginner I forget, though I know I shouldn't, how helpful debuggers are. Thanks again!
Topic archived. No new replies allowed.