Struct/Array problem

I'm working on a homework assignment that keeps track of online friends' names, interests, and age. Can anyone tell me if I have set this up correctly? VS doesn't like the friend[] array and I'm not sure how to fix it. Any help would be nice. Thank you.


This is the header file that is supposed to contain the struct of Friend and the function prototypes.

#include <iostream>
#include <string>

using namespace std;

const int arr = 10;
struct Friend{
string name;
string interests;
int age;
}friend[arr];

void AddFriend (Friend friend[], int size);
void RemoveFriend (Friend friend[], int size);
void SearchInterest (Friend friend[], int size, string keywords);
void DisplayFriend (Friend friend[], int size);
void ListFriend(Friend friend[], int size);
float ReportAge(Friend friend[], int size);
bool IsBefore (Friend friend1, Friend friend2);
VS doesn't like the friend[] array and I'm not sure how to fix it.

Name it something different, "friend" is a keyword in C++.

Wow that easy... Thank you sir.
Topic archived. No new replies allowed.