Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Compile error ‘std::string’ has no member named ‘back’ #5

Closed
DaSpawn opened this issue Oct 7, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@DaSpawn
Copy link

commented Oct 7, 2015

I ran across this error attempting to run make

unit.cpp: In function ‘bool testExtendAndPrepend(uint)’:
unit.cpp:37:29: error: ‘std::string’ has no member named ‘back’
     if(hf.hash_extend(input.back()) != hf.hash(extend)) {
                             ^
unit.cpp:39:60: error: ‘std::string’ has no member named ‘back’
         std::cout << extend << " " << hf.hash_extend(input.back()) << " " << hf.hash(extend) << std::endl;
                                                            ^
In file included from /usr/include/c++/4.8/cassert:43:0,
                 from characterhash.h:8,
                 from cyclichash.h:4,
                 from unit.cpp:4:
unit.cpp:45:33: error: ‘std::string’ has no member named ‘back’
     assert(hf.hash_extend(input.back()) == hf.hash(extend));
                                 ^
make: *** [unit] Error 1

I need to add compile argument. in Makefile, CXXFLAGS, I added -std=c++11

lemire added a commit that referenced this issue Oct 7, 2015

@lemire

This comment has been minimized.

Copy link
Owner

commented Oct 7, 2015

Thanks. I have updated the Makefile.

I am closing this issue.

@lemire lemire closed this Oct 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.