由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - leetcode 的编译器是旧的还是新的?
相关主题
leetcode, sort algorithm compiler error c++请问那个给leetcode题目难易程度list的网站是什么?
我很想知道leetcode用的编译器和编译参数美国CS就业市场已经严重饱和了
leetcode, codeforces, POJ 到底刷哪个 ?C++ Singleton Template - 编译通不过
bloomberg online assessement (JAVA) 4amazon的面经
Bloomberg phone interview (intern)[合集] 贡献几个C/C++编程电话面试题
C++ Q89: function template and overloadingAmazon 电面经历
C++: 如何对const data member做assignment?白版测试interview远程的一般都什么样。。要求写出的代码一般都是bug free吗
请问关于overloading << (转载)Amazon 两轮电话面经 及 design问题请教
相关话题的讨论汇总
话题: leetcode话题: std话题: pair话题: string话题: 编译器
进入JobHunting版参与讨论
1 (共1页)
j*****y
发帖数: 1071
1
我的电脑的是 g++ 4.4.3 ,编译下面的代码可以过,但是 leetcode过不了
定义了一个 函数
bool comp(const pair & a, const pair & b);
然后有个 vector > v;
然后调用 sort(v.begin(), v.end(), comp);
我的电脑可以编译。 但是 leetcode给了这个错误
no matching function for call to 'sort(std::vector basic_string > >::iterator, std::vector string > >::iterator, )
r*******e
发帖数: 7583
2
试了leetcode没有问题
你是不是定义了多个comp()函数

【在 j*****y 的大作中提到】
: 我的电脑的是 g++ 4.4.3 ,编译下面的代码可以过,但是 leetcode过不了
: 定义了一个 函数
: bool comp(const pair & a, const pair & b);
: 然后有个 vector > v;
: 然后调用 sort(v.begin(), v.end(), comp);
: 我的电脑可以编译。 但是 leetcode给了这个错误
: no matching function for call to 'sort(std::vector: basic_string > >::iterator, std::vector: string > >::iterator, )

j*****y
发帖数: 1071
3
多谢。 我就定义一个阿, 我再看看

【在 r*******e 的大作中提到】
: 试了leetcode没有问题
: 你是不是定义了多个comp()函数

1 (共1页)
进入JobHunting版参与讨论
相关主题
Amazon 两轮电话面经 及 design问题请教Bloomberg phone interview (intern)
汗,不问算法C++ Q89: function template and overloading
问个内存泄露的问题C++: 如何对const data member做assignment?
请教operator const char*() 的问题请问关于overloading << (转载)
leetcode, sort algorithm compiler error c++请问那个给leetcode题目难易程度list的网站是什么?
我很想知道leetcode用的编译器和编译参数美国CS就业市场已经严重饱和了
leetcode, codeforces, POJ 到底刷哪个 ?C++ Singleton Template - 编译通不过
bloomberg online assessement (JAVA) 4amazon的面经
相关话题的讨论汇总
话题: leetcode话题: std话题: pair话题: string话题: 编译器