Count the Vowels in a String
The code has been modified slightly and now uploaded to the site.

106.cpp
#include <iostream>
#include <string>
#include "Vowels106.h"
using namespace std;
// NOT SURE IF IT'S SUPPOSED TO WORK WITH ONLY ONE WORD
int main(){
std::string input;
std::cout << "Enter a string: \n";
std::cin >> input;
Vowels106 vowels(input);
int result = vowels.countVowels(input);
std::cout << "There are " << result << " vowels\n";
}
Vowels106.h
#include <string>
#ifndef Vowels106_H
#define Vowels106_H
class Vowels106{
public:
Vowels106(std::string& s);
int countVowels(std::string& s);
};
#endif
Vowels106.cpp
#include "Vowels106.h"
#include <string>
Vowels106::Vowels106(std::string& s){
}
int Vowels106::countVowels(std::string& s){
int counter = 0;
for (int i = 0; i < s.length(); i++){
if (s.substr(i, 1) == "A" || s.substr(i, 1) == "a" || s.substr(i, 1) == "E" || s.substr(i, 1) == "e" || s.substr(i, 1) == "I" || s.substr(i, 1) == "i" || s.substr(i, 1) == "O" || s.substr(i, 1) == "o" || s.substr(i, 1) == "U" || s.substr(i, 1) == "u"){
counter++;
}
}
return counter;
}