I'm trying to use is_sorted.
When I do #include<algo.h>, I get:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This
file includes at least one deprecated or antiquated header. Please consider
using one of the 32 headers found in section 17.4.1.2 of the C++ standard.
Examples include substituting the <X> header for the <X.h> header for C++
includes, or <sstream> instead of the deprecated header <strstream.h>. To
disable this warning use -Wno-deprecated.
When I do #include<algorithm>, I get:
file.h:158: error: `is_sorted' undeclared (first use this function)
file.h:158: error: (Each undeclared identifier is reported only once for
each function it appears in.) 4 6679
"Lieven" <li*************@hotmail.com> wrote... I'm trying to use is_sorted.
There is no 'is_sorted' in Standard C++.
When I do #include<algo.h>, I get:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
When I do #include<algorithm>, I get:
file.h:158: error: `is_sorted' undeclared (first use this function) file.h:158: error: (Each undeclared identifier is reported only once for each function it appears in.)
Well, there is no 'is_sorted'. You could use 'adjacent_find' with your
own predicate to see if any of the objects are not in the right order.
V
Lieven wrote: I'm trying to use is_sorted. When I do #include<algo.h>, I get:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
When I do #include<algorithm>, I get:
file.h:158: error: `is_sorted' undeclared (first use this function) file.h:158: error: (Each undeclared identifier is reported only once for each function it appears in.)
Do:
#include <ext/algorithm>
You might want to look in the ext folder - it includes quite a few
useful library extensions, such as hashed containers, custom allocators,
etc.
Tom
Tom Widmer wrote: Lieven wrote:
I'm trying to use is_sorted. When I do #include<algo.h>, I get:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
When I do #include<algorithm>, I get:
file.h:158: error: `is_sorted' undeclared (first use this function) file.h:158: error: (Each undeclared identifier is reported only once for each function it appears in.)
Do: #include <ext/algorithm> You might want to look in the ext folder - it includes quite a few useful library extensions, such as hashed containers, custom allocators, etc.
Tom
Still doesn't work. Strangely enough only for this file. When I create a
test case it does work with #include<ext/algorithm>.
Lieven De Keyzer wrote: Tom Widmer wrote:
Lieven wrote:
I'm trying to use is_sorted. When I do #include<algo.h>, I get:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
When I do #include<algorithm>, I get:
file.h:158: error: `is_sorted' undeclared (first use this function) file.h:158: error: (Each undeclared identifier is reported only once for each function it appears in.) Do: #include <ext/algorithm> You might want to look in the ext folder - it includes quite a few useful library extensions, such as hashed containers, custom allocators, etc.
Tom
Still doesn't work. Strangely enough only for this file. When I create a test case it does work with #include<ext/algorithm>.
The algorithm is __gnu_cxx::is_sorted. Look in the ext/algorithm header
to see how to use it.
Also, RTFM: http://gcc.gnu.org/onlinedocs/libstd...index.html#5_4
(and various other pages/faqs)
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Uwe Mayer |
last post by:
Hi,
Why is the UserDict module is deprecated after Python 2.2. The application
of it I have in mind is, i.e. multiple inheritance from "file" and "dic" -
which is not possible.
If I used...
|
by: G. Peter |
last post by:
Hi there,
I've a 'funny' error message of my compiler (g++ 2.95.4) that tells me:
robot.cpp: In method `Robot::Robot()':
robot.cpp:19: warning: deprecated conversion from string constant to...
|
by: puzzled |
last post by:
Okay, so my subject sounds a bit crass. As much as I'd like to
totally embrace css and avoid "deprecated" usage, sometimes the
deprecated stuff is so much easier and more effective. Plus, it at...
|
by: Matt Parkins |
last post by:
Hi,
(I realise this probably isn't precisely the right group for this - could
someone direct me to the appropriate group to post this question? - thanks
!)
I'm using Visual C++ 2005 Express...
|
by: Marcus |
last post by:
We all know that the "gets" function from the Standard C Library (which
is part of the Standard C++ Library) is dangerous. It provides no
bounds check, so it's easy to overwrite memory when using...
|
by: Ben Rush |
last post by:
When I compile my solution I get the following output -
NET 2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995:
'wsprintf': name was marked as #pragma deprecated
C:\Program Files\Microsoft...
|
by: steve.j.donovan |
last post by:
Hi guys,
We have the following macro:
#define NEXT(type,p) (*((type*)(p))++)
It provides a way to poke variable sized data into an array of pcode
for a simple VM.
e.g,
|
by: rorni |
last post by:
Hi,
I'm compiling on AIX code that is ported from Windows, where it compiles and works.
I'm using gcc 3.3.2 .
The code uses the non-deprecated headers, e.g.
#include <math>
but when I...
|
by: lovualways |
last post by:
I tried solving the knight,s tour problem................I get the following msg while compiling:
#warning This file includes at least one deprecated or antiquated header. \
Please consider
using...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |