Why I Cant get an output?

I wrote a program that should check if phrase is in file and output the result.
File:
//////////////
Eat my shorts!
Ay Carumba!
Stupid Flanders...
////////
Why my program doesn't cout?

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
35
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>

using namespace std;

string checkData (char Input[], char dataB [], int nMAX){
       int num = 0;
       if(Input == dataB) {
                cout <<"This sentence exist in Database!" <<endl;
       }
       else if(Input != dataB && num == nMAX){
            cout <<"This sentence does not exist in database!" <<endl;
       }
       else num++;
}

int main(int argc, char *argv[])
{
    char Input [80];
    cin >> Input;
    char eilute [80];
    ifstream fr ("example.txt");
    if(!fr.is_open()) return 1;
    while(!fr.eof()){
    fr.get(eilute, 80,'\n');
    fr.ignore();
    checkData(Input, eilute, 3);
    }
    fr.close();
    cin.get ();
    cin.get();
    return 0;
}
The only time the condition on line 13 can evaluate to true is when nMAX is 0.

The increment on line 16 is to a local variable that disappears as soon as the function returns. You get a new num variable on each infocation of checkData.
Thank You :D
Topic archived. No new replies allowed.