I have two programs. 1:
#include <iostream>
using namespace std;
int main () {
    
    do {
        cout<<"Hello world";
        char yn='y';
    } while (yn=='y' || yn=='Y');
    return 0;
}
2:
#include <iostream>
using namespace std;
int main () {
    char yn='y';
    do {
        cout<<"Hello world";
    } while (yn=='y' || yn=='Y');
    return 0;
}
First program is showing error like this:
comparison between pointer and integer ('double (*)(int, double)' and 'char')
    } while (yn=='y' || yn=='Y');
I think both programs are same but still first program is showing error.
 
     
     
    