LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2015, 09:36 AM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
error: ‘reverse’ is not a member of ‘std’


Hi All,
need to reverse a list of vectors ( c++ c11 GCC ) I was going to do a copy and then swap and replace. However I thought I'd check out if something already existed and found reverse. I tried to use this on my vectors
[ code ]
/*swap the list around*/
std::reverse( win.list.begin( ), win.list.end( ) );
[/code]
I get the title error "error: ‘reverse’ is not a member of ‘std’" can anyone advise why I get this? I'm I misreading the how this should be used or does it not exist in some forms of C++?

http://www.cplusplus.com/reference/algorithm/reverse/
 
Old 10-02-2015, 09:40 AM   #2
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Original Poster
Rep: Reputation: 43
Sorry scrub this question forgot header "#include <algorithm>" thought it was in vectors for some reason!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl: suppress std output and std error say_hi_ravi Programming 1 11-01-2012 06:22 AM
'auto_ptr' is not a member of 'std' harishisnow Programming 2 11-28-2010 11:13 PM
error: ‘libintl_snprintf’ is not a member of ‘std’ make: *** [image.o] Error 1 mmateen Linux - Hardware 0 08-13-2009 11:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration