Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

comparing vectors of std::bitsets

3 views
Skip to first unread message

Sean Farrow

unread,
Sep 4, 2008, 4:49:06 AM9/4/08
to
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.


Alf P. Steinbach

unread,
Sep 4, 2008, 5:16:32 AM9/4/08
to
* 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

unread,
Sep 4, 2008, 5:19:39 AM9/4/08
to
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" <al...@start.no> wrote in message
news:WbmdnZlb0aDuOiLV...@posted.comnet...

anon

unread,
Sep 4, 2008, 5:48:54 AM9/4/08
to
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" <al...@start.no> wrote in message
> news:WbmdnZlb0aDuOiLV...@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-overloading.html

Juha Nieminen

unread,
Sep 4, 2008, 9:49:53 AM9/4/08
to
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?

0 new messages