I tried making this small program that takes input and checks for vowels. If there are vowels then it appends them to a string and returns the size of the string. 

My only problem is I can't get it to work using strings. What is the major difference over using character arrays? I can get the program to work using something like:

```
char entered[128];
//and then
char exceptions[11] = "aeiouAEIOU";

```

\*\*Quick question about the above array. When I assign the buffer to 'exceptions' it has to be 11 or the compiler will error. Must I manually account for the NULL termination portion?

If I do something like:

```
if(cPtrI[i] == 'a'){

```

I get an error stating unknown operator '==' ??
I thought '==' was a check operator, and '=' was an assignment operator?

```
no match for 'operator==' in '*((+(((unsigned int)i) * 4u)) + cPtrI) == 'a''|

```

AND, if I do something like: (which I thought was correct, at first)

```
if(*cPtrI[i] == *cPtrJ[j]){

```

I get the same error as above, but referencing unknown operator \*:

```
no match for 'operator*' in '**((+(((unsigned int)i) * 4u)) + cPtrI)'|
no match for 'operator*' in '**((+(((unsigned int)j) * 4u)) + cPtrJ)'|

```

I thought the \* operator said, in effect, 'what is at' the address of where the pointer is pointing.

So, something like the above would read:

```
If(What is at index I of string 'a' EQUALS What is at index J of string 'exceptions'){
then ..

```

Any help with this one? I learned C a bit before C++, so perhaps this is where my confusing is coming from. It was my understanding the the above code would compare addresses of characters/variables they are pointing to. \* indicates 'what is at' while just placing the pointer name would indicate the value the pointer is holding(which is an address of the variable being pointed to). Using &ptrName would be the address of the pointer itself, correct? Where have I gone wrong here?

```
#include <iostream>
#include <string>

int vowelCheck(std::string a);

int main()
{using namespace std;

    string eString;
    cout << "Enter a string: ";
        cin >> eString;
    cout << "There were " << vowelCheck(eString) << " vowels in that string.";
    return 0;
}

int vowelCheck(std::string a)
{using namespace std;

    string exceptions = "aeiouAEIOU";
    string vowels;
    string *cPtrI = &a;
    string *cPtrJ = &exceptions;

    for(int i = 0; i < a.size(); i++){
        cout << i <<"i\n";
        for(int j = 0; j < 10; j++){
            cout << j << "j\n";
           // cout << cPtrJ[j];
            if(cPtrI[i] == cPtrJ[j]){ //if index of A equal index of J then
                cout << "Added: " << cPtrJ[j];
                vowels.append(cPtrJ[j]); // append that vowel to the string 'vowels'
                break;
            }
        }
    }
    return vowels.size();
}

```

Using my debug tools listed above, the program will only increment through j = 8 then stops. Also, if I even enter an initial string something like AEIOU, it will string go through j = 8. So, it is not seeing the equivalent characters. 

What am I doing wrong using strings?