[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

comparing vectors of std::bitsets

sean.farrow@seanfarrow.co.uk

9/4/2008 8:49:00 AM

Hi:
Will the defaul vector < operator allow me to compare two vectors of std::
bitsets?
If not how do I get round this?
Cheers
Sean.


4 Answers

Alf P. Steinbach

9/4/2008 9:17:00 AM

0

* Sean Farrow:
> Hi:
> Will the defaul vector < operator allow me to compare two vectors of std::
> bitsets?

Why don't you try it?


> If not how do I get round this?

In the first paragraph you used words that, if they were your own, would make
this follow up question extremely unlikely, unless you suffered a brain-damaging
accident in the short time between writing the first paragraph and deciding on
writing the second. Hence, this is not your own question. It is *HOMEWORK*.

Read the FAQ item on homework question.


Cheers & hth.,

- Alf

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

sean.farrow@seanfarrow.co.uk

9/4/2008 9:20:00 AM

0

Hi:
This is *not* homework. I'm in the process of finishing a comercial project.
How do I overload the [] operator?
Chers
Sean.
"Alf P. Steinbach" <alfps@start.no> wrote in message
news:WbmdnZlb0aDuOiLVnZ2dnUVZ_vadnZ2d@posted.comnet...
>* Sean Farrow:
>> Hi:
>> Will the defaul vector < operator allow me to compare two vectors of
>> std:: bitsets?
>
> Why don't you try it?
>
>
>> If not how do I get round this?
>
> In the first paragraph you used words that, if they were your own, would
> make this follow up question extremely unlikely, unless you suffered a
> brain-damaging accident in the short time between writing the first
> paragraph and deciding on writing the second. Hence, this is not your own
> question. It is *HOMEWORK*.
>
> Read the FAQ item on homework question.
>
>
> Cheers & hth.,
>
> - Alf
>
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is it such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing on usenet and in e-mail?


anon

9/4/2008 9:49:00 AM

0

Sean Farrow wrote:
> Hi:
> This is *not* homework. I'm in the process of finishing a comercial project.
> How do I overload the [] operator?
> Chers
> Sean.
> "Alf P. Steinbach" <alfps@start.no> wrote in message
> news:WbmdnZlb0aDuOiLVnZ2dnUVZ_vadnZ2d@posted.comnet...
[snip]
>> Cheers & hth.,
>>
>> - Alf
>>
>> --
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is it such a bad thing?
>> A: Top-posting.
>> Q: What is the most annoying thing on usenet and in e-mail?
>
>

What an irony :)


Anyway, answers to your question are:
1) STFG
2) http://www.parashift.com/c++-faq-lite/operator-overlo...

Juha Nieminen

9/4/2008 1:50:00 PM

0

Sean Farrow wrote:
> This is *not* homework. I'm in the process of finishing a comercial project.
> How do I overload the [] operator?

Let me get this straight: You are developing a commercial project in
C++ and you don't even know how to overload the [] operator, or whether
you can compare bitsets with operator<?

You know, there are good books about C++ out there. Even free ones
online. Ever heard of this thing called google?