Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Ex10.5 doubt #343

Closed
zhuanggengzhen opened this issue Oct 11, 2015 · 2 comments
Closed

Ex10.5 doubt #343

zhuanggengzhen opened this issue Oct 11, 2015 · 2 comments

Comments

@zhuanggengzhen
Copy link
Contributor

hello,I wrote a test case,but the result is different from yours.can you list one example for the answer of Ex10.5.

my test case:

#include <vector>
#include <string>
#include <algorithm>
#include <iostream>
using std::cout;
using std::endl;
using std::vector;
using std::string;
using std::boolalpha;
int main()
{
    string s1 = "ok";
    string s2 = "test";
    const char *c1 = "ok";
    const char *c2 = "test";
    vector<string> vs{s1, s2};
    vector<string> vs2{s1, s2};
    vector<const char *> vc{c1, c2};
    vector<const char *> vc2{c1, c2};
    cout << boolalpha << equal(vs.cbegin(), vs.cend(), vs2.cbegin()) << endl;
    cout << boolalpha << equal(vc.cbegin(), vc.cend(), vc2.cbegin()) << endl;
    return 0;
}

and the result is

true
true
@Mooophy
Copy link
Owner

Mooophy commented Oct 13, 2015

Hi @zhuanggengzhen
Please check #227 for detail.

@zhuanggengzhen
Copy link
Contributor Author

THX,admire the solver

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants