chsalvia
asked on
Passing a reference to a function
I have a reference to a string, and I want to pass one character of that string to another function.
Basically, I have something like:
void func1(string *doc)
{
if (func2(doc[i]))
{
//do something
}
}
bool func2(char *chr)
{
return true;
}
How do I correctly pass (*doc)[i] to func2?
Basically, I have something like:
void func1(string *doc)
{
if (func2(doc[i]))
{
//do something
}
}
bool func2(char *chr)
{
return true;
}
How do I correctly pass (*doc)[i] to func2?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER