Get Only Function

I have this project where we have to take a rule off of this website https://uic.edu/apps/strong-password/ and calculate the number of points for each Column and we have to do the first 5 of each section. I was able to do the first five with some minor trial and error, but I am stuck on the next section trying to figure out how to do the Letters Only formula. the formula is -n and if there is anything other than letters (numbers or symbols) it is supposed to come back with a sore of 0. I have gotten some help from others and was given something that is supposed to help but I can't figure out how to make it work how I would like it to. I would appreciate any suggestions since this project is due tonight. What I have so far will be posted down below for this class.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  class LettersOnly : public myabstractclass
{
public:
    int GetLettersOnly()
    {
        size_t GetLettersOnly();
         {
            size_t counter{};

            for (const unsigned char ch : password)
                counter += !!isupper(ch);

            return counter;
        }
    }

    int GetLettersOnlyBonus()
    {
        int x = GetLettersOnly();
        return (-(x));
    }
};
Last edited on
Topic archived. No new replies allowed.