小编moo*_*rej的帖子

非英语演讲者的编程资源

我在公立大学教授基础网络编程课程.我经常有学生在他们选修课程的同时努力学习英语.在许多情况下,我认为我希望有各种语言的其他课程材料,以避免一些技术障碍与语言学混合.

任何人都可以推荐一个"stackoverflow",其主要语言基础是日语,中文,波兰语或西班牙语?或者类似地,任何列出的语言中的网站都是针对Web开发的?

编辑:我要问的一点是,建议应基于网站的使用以及对语言的熟悉程度或对网站声誉的合理了解.

正如一位回应者所提到的,学生可以用他们的母语搜索他们所拥有的任何问题.虽然这可能是一个很好的策略,但它并不总是指向高质量的信息.

谢谢!

html css

5
推荐指数
1
解决办法
200
查看次数

C++模板+迭代器(noob问题)

我的免责声明是我在一周前开始自学C++课程,而我之前的编程经验是动态语言(Python,javascript).

我正在尝试使用通用函数迭代矢量的内容来打印出项目:

#include <iostream>
#include <algorithm>
#include <vector>

using std::vector;
using std::cout;

template <class T>
void p(T x){
    cout << x;
}

int main () {

    vector<int> myV;

    for(int i = 0; i < 10; i++){
        myV.push_back(i);
    }

    vector<int>::const_iterator iter = myV.begin();

    for_each(iter, myV.end(), p);

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

代码无法编译.有人解释原因吗?

编辑:编译器错误:

error: no matching function for call to 'for_each(_gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<const int, _gnu_norm::vector<int, std::allocator<int> > >, __gnu_debug_def::vector<int, std::allocator<int> > >&, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<int, __gnu_norm::vector<int, std::allocator<int> > >, __gnu_debug_def::vector<int, std::allocator<int> > >, <unknown type>)'

谢谢!

c++ templates iterator

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

标签 统计

c++ ×1

css ×1

html ×1

iterator ×1

templates ×1