473,395 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

const_reverse_operator prob

I'm using #~*&$§ VC6 and have this problem:

// good
std::deque<A_POINT>::const_iterator it = p.POINTS.begin();
// bad
std::deque<A_POINT>::const_reverse_iterator it = p.POINTS.rbegin();

// reason:

error C2440: 'initializing' :
'class std::reverse_iterator<
class std::deque<
struct A_POINT,class std::allocator<struct A_POINT>
::iterator, struct A_POINT,struct A_POINT &,
struct A_POINT *,int>'

cannot be converted to

'class std::reverse_iterator<
class std::deque<
struct A_POINT,class std::allocator<struct A_POINT>::const_iterator,

struct A_POINT,struct A_POINT const &,
struct A_POINT const *,int>'

Source type was not accepted from any c'tors or ambigious.

Short: The _const_ is freaking out.

Now: How can I print out a deque backwards in VC6?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}

________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
Oct 24 '05 #1
2 1435
Gernot Frisch wrote:
I'm using #~*&$§ VC6 and have this problem:

// good
std::deque<A_POINT>::const_iterator it = p.POINTS.begin();
// bad
std::deque<A_POINT>::const_reverse_iterator it = p.POINTS.rbegin();

// reason:

error C2440: 'initializing' :
'class std::reverse_iterator<
class std::deque<
struct A_POINT,class std::allocator<struct A_POINT>
>::iterator,

struct A_POINT,struct A_POINT &,
struct A_POINT *,int>'

cannot be converted to

'class std::reverse_iterator<
class std::deque<
struct A_POINT,class std::allocator<struct A_POINT>
>::const_iterator,

struct A_POINT,struct A_POINT const &,
struct A_POINT const *,int>'

Source type was not accepted from any c'tors or ambigious.

Short: The _const_ is freaking out.

Now: How can I print out a deque backwards in VC6?


What's stopping you from using a regular reverse_iterator? Slap a
comment on it saying something to the effect of "thou shalt not modify
values pointed to by this iterator."

Kristo

Oct 24 '05 #2

"Kristo" <kr*******@gmail.com> schrieb im Newsbeitrag
news:11*********************@o13g2000cwo.googlegro ups.com...
Gernot Frisch wrote:
I'm using #~*&$§ VC6 and have this problem:

// good
std::deque<A_POINT>::const_iterator it = p.POINTS.begin();
// bad
std::deque<A_POINT>::const_reverse_iterator it = p.POINTS.rbegin();

// reason:

error C2440: 'initializing' :
'class std::reverse_iterator<
class std::deque<
struct A_POINT,class std::allocator<struct A_POINT>
>::iterator,

struct A_POINT,struct A_POINT &,
struct A_POINT *,int>'

cannot be converted to

'class std::reverse_iterator<
class std::deque<
struct A_POINT,class std::allocator<struct A_POINT>
>::const_iterator,

struct A_POINT,struct A_POINT const &,
struct A_POINT const *,int>'

Source type was not accepted from any c'tors or ambigious.

Short: The _const_ is freaking out.

Now: How can I print out a deque backwards in VC6?


What's stopping you from using a regular reverse_iterator? Slap a
comment on it saying something to the effect of "thou shalt not modify
values pointed to by this iterator."

The deque comes from an const argument, thus I can't use a regular
iterator, can I?
Oct 25 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: josephrthomas | last post by:
hi..i am trying to make a login page and i am using access table.. when the user enters his userid and password i want to check the password from the table.. if any user with the userID that is...
29
by: Thomas | last post by:
Hi I have an XSL stylesheet: <xsl:for-each select="TRACKS/TRACK"> <tr class="TDL"> <td width="90%"><xsl:number value="position()" format="1" /> - <xsl:value-of select="TRACKTITLE"/></td>...
5
by: David Sobey | last post by:
Hi Sorry bout this basic prob. Got a file called file.obj. tryna read the first line from it as a string and print it to the screen. getting errors: #include "stdafx.h" #include <stdio.h>...
2
by: Dishan Fernando | last post by:
Hi my prob is like this.. ----------------------------- create table ax( i int , j int ) create table ay( i int ,
15
by: Raj | last post by:
Hello all: We have a table with about 2400 cells. Our requirement is to highlight the cells in the table whose data has changed, every 5 seconds. Our script behaves relatively ok in Firefox, but...
6
by: skubik | last post by:
Hi everyone. I'm attempting to write a Javascript that will create a form within a brand-new document in a specific frame of a frameset. The problem is that I can create the form and input...
2
by: Wilhelm Kutting | last post by:
hi, i like to solve a code-prob: tidy is bitching about <...> proprietary attribute "type" <...> lacks "action" attribute how can i make this nice? this is my code
28
by: Vishal Naidu | last post by:
i m new to the C world... i ve been told by my instructors not to use goto stmt.. but no one could give me a satisfactory answer as to why it is so.. plz help me out of this dilemma, coz i use...
0
Savage
by: Savage | last post by:
I'm making for fun a simple program which format a input file.Input file sustain of person name,lastname and date of birth.Output file si supposed to be forammted as following: NAME ...
2
by: mnacw | last post by:
Can anybody help me to resolve this prob. i have installed Visual Studio 2005 Professional edition. I am working in VB.Net. When I tried to connect to database it is connected but when i make some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
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...
0
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...
0
marktang
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,...
0
Oralloy
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.