Link to home
Start Free TrialLog in
Avatar of chsalvia
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?
ASKER CERTIFIED SOLUTION
Avatar of amit_g
amit_g
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chsalvia
chsalvia

ASKER

okay thanks!