Searching and comparing arrays

Hello everybody, I have simple practice assignment where I have to search an array for the string "Windy". If the array contains the "Windy" then the program will display the message "Windy found." Otherwise it will display "Windy not found."

I thought that using strcmp would get the job done but after whipping out a program I quickly realized that this function isn't right for the job. Can anyone lead me in the right direction here. I will leave my program below.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

#include <iostream>
#include <cstring>

using namespace std;

int main()
{
    const int SIZE = 40;
    char place[] = "The Windy City";
    char secondString[SIZE];

    cout << "Enter Windy." << endl;
    cin.getline(secondString,SIZE);
    if (strcmp(place, secondString) <0)
        cout << "Windy found." << endl;
    else
        cout << "Windy not found." << endl;

    return 0;
}

Are you allowed to use the STL string library? If so, you can use string::find:
http://www.cplusplus.com/reference/string/string/find/
Topic archived. No new replies allowed.