I have a string in main and I want to be able to determine it's length in function Foo.
void Foo(string S);
main()
{
char S [15];
Foo(s);
}
void Foo(string S)
{
int Length;
Length = strlen(S);
}
When I complile, I keep getting this error message: cannot convert 'S' from type 'string' to 'const char *'
What am I doing wrong?
Thanks,
Buzz