相关疑难解决方法(0)

如何有两个相互调用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
}
Run Code Online (Sandbox Code Playgroud)

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

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

c++ mutual-recursion

11
推荐指数
2
解决办法
7847
查看次数

标签 统计

c++ ×1

mutual-recursion ×1