I'm trying to make program that reads from a file and adds to a binary tree, but when I try to compile I get an error:
"Error 1 'treePersons::display' : cannot convert parameter 1 from 'Node *' to 'Person *[]'"
The error appears in the call to display() in main()
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
struct Person{
  int social;
  int birthday;
  string first;
  string last;
  string state;
  double balance;
  Person();
  Person(int s, int b, string f, string l, string t, double a)
  {
    social = s;
    birthday = b;
    first = f;
    last = l;
    state = t;
    balance = a;
}
};
struct Node{
    Person data;
    Node *left;
    Node *right;
    Node();
    Node(Person x){
        data = x;
        left = NULL;
        right = NULL;
    }
};
class treePersons
{
protected:
public:
    Node *root;
    treePersons(){
        root = NULL;
}
int fileName(Person *data[])
{
  ifstream fin; 
  fin.open ("dbfile1.txt");  
  if (!fin.is_open())
      cout << "File not found" << endl;
  int i;
  for(i = 0; i<100; i++)
      while(fin.good())
      {
          fin >> data[i]->social >> data[i]->birthday >> data[i]->first >> data[i]->last >> data[i]->state >> data[i]->balance;
          i++;
      }
      return i;
}
void add(Person *data[], Node*root)
{
    int i = fileName(data);
    if(root == NULL)
    {
        root = new Node();
    }
    for(int l = 0; l<i; l++)
    {
    if(data[i]->last == root->data.last)
    {
        if(data[i]->first != root->data.first)
        {
          if(data[i]->first < root->data.first)
          {
            add(data, root->left);
          }
          else if(data[i]->first > root->data.first)
          {
            add(data, root->right);
          }
          else if(data[i]->last == root->data.last && data[i]->first == root     ->data.first)
          {
            cout << "already exists" << endl;
          }
          else if(data[i]->first < root->data.first)
          {
            add(data, root->left);
          }
          else if(data[i]->first > root->data.first)
          {
            add(data, root->right);
          }
        }
    }
    }
}
void printAlphabetically(Node *root)
{
  if (root != NULL) 
  {
    printAlphabetically(root->left);
    cout << root->data.last << endl;
    printAlphabetically(root->right);
  }
return;
}
void display(Person *data[],Node *root)
{
    add(data,root);
    printAlphabetically(root);
};
};
struct State{
    string state;
    Person data;
    State* left;
    State * right;
    State();
    State(Person x)
    {
        data = x;
        left = NULL;
        right = NULL;
    }
};
class treeState{
protected:
    State *root;
public:
    treeState()
    {
        root = NULL;
    }
};
void main(){
    treePersons T;
    T.display(T.root->data,T.root);
}
 
     
    