QUOTE(KYA @ 29 May, 2008 - 11:21 PM)

There's no main. What is included in "Name.h"?
Sorry about that. I had to split the program into three files (header, implementation, main)
Here are all three files.
CODE
void DisplayName(char*Name);
CODE
#include <iostream>
#include <string>
#include "Name.h"
using namespace std;
void DisplayName(char*Name)
{
int *maxName = new int[400];
int name = maxName[400];
if (name == 0)
{
cout << "Error: memory could not be allocated" << endl;
};
for (int i=0; i<name; i++)
{
name[i] = '\0';
}
{
cout << "Your name is: " << name << endl;
}
}
CODE
#include <iostream>
#include <string>
#include "Name.h"
using namespace std;
int main ()
{
const int NAME = 400;
char nameArray[NAME];
cout << "Please enter your last name: ";
cin >> nameArray;
cout << "Please enter your first name: ";
cin >> nameArray;
cout << "Please enter your middle name: ";
cin >> nameArray;
DisplayName(nameArray);
system("PAUSE");
}