I am making a Pangram and Error occurs "There is no match for Operator"

Error which occurs is, no match for operator >= and <=, It will be so helpful if you guys guide me to some modifications in the code and i can complete my Pangram program.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  #include <iostream>
#include <string>
using namespace std;


void isPangram() {
     
    int count = 0;
    string str;
    cout << "Enter a string to check if its Pangram or not: ";
    getline(cin, str);
    cout << str << endl;
    
    while ( count == 26 ) {
          
          if ( str >= 97 && str <= 122 ) {
               
               cout << "It is Pangram";
               } else {
                      
               cout << "It is not a Pangram";       
                      }
          count++;
          }  
     
}      
       
int main() {
    
    isPangram();
    
    system("pause");
}       
You are trying to compare a string with an integer. The compiler doesn't know how such a comparison should work so it gives an error.
Last edited on
Topic archived. No new replies allowed.