What is your syntax error? Copy and past it here. Also where does the user input the names. If I'm not mistaken, your trying to pass "name" to "GetNames" in the main, which you haven't done anything. Try something like:
1 2 3 4 5 6 7
int main()
{
string name[MAX_NAMES]; //if you're using a for loop then use it in the main.
cin >> name;
//then add the rest and pass "name" to the functions.
//also your "int i" isn't being used anywhere in the main.
}
Compiling...
XXXX-c018.cpp
C:\Documents and Settings\two\Desktop\Classworks\XXXX-c018.cpp(36) : error C2065: 'lower' : undeclared identifier
C:\Documents and Settings\two\Desktop\Classworks\XXXX-c018.cpp(42) : error C2373: 'lower' : redefinition; different type modifiers
C:\Documents and Settings\two\Desktop\Classworks\XXXX-c018.cpp(44) : error C2228: left of '.length' must have class/struct/union type
C:\Documents and Settings\two\Desktop\Classworks\XXXX-c018.cpp(45) : error C2664: 'tolower' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'int'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\Documents and Settings\two\Desktop\Classworks\XXXX-c018.cpp(46) : error C2664: '__thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::std::basic_string<char,struct std::char_traits<char>,class s
td::allocator<char> >(const class std::allocator<char> &)' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > []' to 'const class std::allocator<char> &'
Reason: cannot convert from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > []' to 'const class std::allocator<char>'
No constructor could take the source type, or constructor overload resolution was ambiguous
Error executing cl.exe.
Classworks.exe - 5 error(s), 0 warning(s)