I tried following this code for my program, but counting the consonants and vowels are not doing what I want them to. Is this the correct format to use?

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

void StateInstructions();
void GetInput();
void TurnUpper();
void TurnLower();
int NumVow(); 
int NumConst();
void RevOrd();

string para;

int main()
{
    int vow, consta;

    StateInstructions();
    GetInput();
    TurnUpper();
    TurnLower();
    vow = NumVow();
    cout << "The number of vowels in the paragraph are: " << vow << endl;
    consta = NumConst();
    cout << "The number of consonants are: " << consta << endl;
    RevOrd();

}

void StateInstructions()
{
    //statements
}

void GetInput()
{
    string prompt;

    prompt = "\nPressing 'enter/return' will end your paragraph\n"
             "Please enter now\n";
    cout << prompt;
    getline(cin, para);
}

void TurnUpper()
{
    //statements
}

void TurnLower()
{
    //statements
}

int NumVow()
{
    string stringCopy;
    stringCopy = para;
    int length, vowCount;
    length = stringCopy.length();
    vowCount = 0;
    char let;
    for (int i = 0; i < length; ++i)
    {
        //transform(stringCopy.begin(), stringCopy.end(), stringCopy.begin(), tolower);
        let = tolower (stringCopy[i]);
        if (isalpha (let) && (let == 'a' || let == 'i' || let == 'o' || let == 'u'))
            ++vowCount;
    }
    return vowCount;
}

int NumConst()
{
    string stringCopy;
    stringCopy = para;
    int length, conCount;
    length = stringCopy.length();
    conCount = 0;
    char let;
    for (int i = 0; i < length; ++i)
    {
        //transform(stringCopy.begin(), stringCopy.end(), stringCopy.begin(), tolower);
        let = tolower (stringCopy[i]);
        if (isalpha (let) && (let != 'a' || let != 'i' || let != 'o' || let != 'u') && (let != ' '))
            ++conCount;
    }
    return conCount;
}

void RevOrd()
{
    //statements
}

dabu....welcome aboard...I reccommend taking a look at the Rules & FAQ for the daniweb forum.This forum has been marked as SOLVED....so you may need to srart your own thread to get the attention of someone to help you. Furthermore....if you don't want them to count the vowels and constanants...what do you want it to do?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.