language: C++ 4.7.2 (gcc-4.7.2)
date: 470 days 1 hour ago
link:
visibility: public
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
#include <iostream>
#include <string>
 
 
//Main should return 0 on success.
int main() {
 
        //Use the standard namespace so there's no need to prefix cout with std::
        using namespace std;
 
        char a[99];
 
        cout << "Please enter your name here:" << endl;
        cin >> a;
 
        // Use strcmp to compare strings, not ==.
        if ( strcmp(a, "reet") == 0) {
                cout << "yes";
        } else {
                cout << "no";
        }
 
 
        //Print a new line.
        cout << endl;
 
        return 0;
}
 
prog.cpp: In function ‘int main()’:
prog.cpp:17: error: ‘strcmp’ was not declared in this scope