what is probelem in this source ?

hello
what is probelem in this source
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <string>

int main()
{
    std::string str; // declare a string variable
    std::cin >> str; // take input and store it in str
    
    if (str == "fine") // are they fine?
        std::cout << "ok" << endl; // output ok if they are fine
    else 
        std::cout << "why are you bad?" << endl; // output why are you bad if they are not

    return 0;
}

Change endl to std::endl or add using namespace std; on line 3.

Topic archived. No new replies allowed.