小编dri*_*pie的帖子

在Perl中,如何在文件中搜索字符串然后打印它所在的行?

这似乎有点补救.

我可以搜索一个文件,我可以打印一行,但对于我的生活,我无法弄清楚如何将两者放在一起.

printing string perl line match

0
推荐指数
1
解决办法
56
查看次数

调用自己 N 次的 C++ 递归函数?

假设我有一个功能:

int recursive(int NbProducts, int NbPlates, int NbPositions)
{ //the following is a recursive function that will call itself 3 times
 //code to be repeated goes here
 recursive(int NbProducts, int NbPlates, int NbPositions);
}
Run Code Online (Sandbox Code Playgroud)

我无法弄清楚的是如何让函数知道它所在的递归数,以及如何停止它。任何有效和聪明的方法来做到这一点?如果它有帮助,我正在使用 boost 算法。

c++ recursion boost function

0
推荐指数
1
解决办法
1490
查看次数

标签 统计

boost ×1

c++ ×1

function ×1

line ×1

match ×1

perl ×1

printing ×1

recursion ×1

string ×1