小编Dar*_*son的帖子

什么是置换指数?

我正在阅读Accelerated C++.我不明白练习5-1:

设计并实现一个程序,从以下输入产生置换索引.置换索引是指每个短语由短语中的每个单词索引的索引.

     The quick      brown fox 
jumped over the     fence
The quick brown     fox 
                    jumped over the fence
         jumped     over the fence
            The     quick brown fox 
    jumped over     the fence
                    The quick brown fox

这个解释对我来说并不清楚.什么是置换索引?

c++ indexing permutation

21
推荐指数
3
解决办法
3249
查看次数

为什么我的编程失败?

我的代码如下:

#include <iostream>

using std::cout;
using std::endl;

int next(int n)
{
    return n + 1;
}

int main()
{
    int next(int);  // function declaration
    int *fp = &next;

    int temp = 10;
    temp = (*fp)(temp);
    cout << temp << endl;

    return 0;  
}
Run Code Online (Sandbox Code Playgroud)

编译器点int *fp = &next;需要调试,但是,我没有发现这句话有什么问题.你能告诉我吗?谢谢你的时间~~

c++ debugging

2
推荐指数
1
解决办法
116
查看次数

编写一个程序来计算每个不同单词在其输入中出现的次数

这是加速C++中的问题(3-3).

我是C++的新手.我已经考虑了很长时间了,但是,我无法弄明白.有人会为我解决这个问题吗?请详细解释,你知道我不擅长编程.告诉我你使用的变量的含义.

c++

-1
推荐指数
1
解决办法
1822
查看次数

标签 统计

c++ ×3

debugging ×1

indexing ×1

permutation ×1