Extracting information

Hi Guys, I have been working on a small piece of code which basically asks the user to enter 4 names. the problem im having is I'm not sure how to extract the names once they have been entered so that I can assign each indervidual name to a class and give it certain points etc etc here is a snippet of my code:

[code]
#include <iostream>
#include <string>
using namespace std;
#define LENGH 25
#define MAX 4


void set_team_name(char team_name[MAX][LENGH])
{
int loop;

for (loop = 0; loop < MAX; loop++)
{
cout << "Enter Team Name: " << endl;
cin.getline(team_name[loop],25);
}
}

int main()
{
cteams teamlist (0);

char teams[MAX][LENGH];

teamlist.set_team_name(teams);
cout << endl;
teamlist.show(teams);
cout<< endl;


[\code]

Anyone got any ideas? tjhanks for your time
I was being extremely silly!!! I have now worked it out! thanks anyway guys!!
Btw, at the end of the tags you use '/' not '\'
Topic archived. No new replies allowed.