
April 8th, 2003, 11:18 PM
|
|
Junior Member
|
|
Join Date: Apr 2003
Location: New York
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
String arrays and passing them to functions
PHP Code:
I have a string array set up to accept student names. I'd like to pass it to a function that would fill in the array with names, and pass it back to the main function.
Tried setting it up like this:
#include <string>
void fill(string array[]);
main function
{
string array[10];
Call fill(array);
}
void fill(string array[])
{
...
}
I get an error message on the function prototype line saying
that "string" is not defined.
Any suggestions on how to change it, to make it work?
|