姬長信(Redy)

如何有两个相互调用的函数C


我有2个这样的函数,它对if循环进行模糊处理:
void funcA(string str)
{
    size_t f = str.find("if");
    if(f!=string::npos)
    {
        funcB(str);        //obfuscate if-loop
    }
}

void funcB(string str)
{
     //obfuscate if loop
     funcA(body_of_if_loop);     //to check if there is a nested if-loop
}

问题是如果我在funcA之前放置funcB,funcA将无法看到funcB,反之亦然.

非常感谢这里的任何帮助或建议.