Monday, June 1, 2009

comp.lang.c++ - 26 new messages in 16 topics - digest

comp.lang.c++
http://groups.google.com/group/comp.lang.c++?hl=en

comp.lang.c++@googlegroups.com

Today's topics:

* static array declaration in flyweight pattern - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/b4df4db8ab107e11?hl=en
* U++ 1254 released - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/fa4c5eb109ef8685?hl=en
* High Cohesion and Low Coupling in C++ - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/t/d8ed656848516be4?hl=en
* C++ Gurus - Is C++ a good choice for public API(s)??? Are there clean ways
to solve known problems there? - 4 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/t/faaac8999a2ece5e?hl=en
* Is this String class properly implemented? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/6d95b63c2d32064a?hl=en
* Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn ) - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/d21c674e9bb9b3ca?hl=en
* D&G T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn ) - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/2a53bb936cc6a59b?hl=en
* discount wholesaler Air Max 88 shoes (paypal payment)( www.niketrade08.cn ) -
1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/32d858d32cb3fedf?hl=en
* wxWidgets and WYSIWYG forms creator clues - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/78b24a3ec8111979?hl=en
* C++ stuff I can't talk about here - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/5017e5dbab2a63a3?hl=en
* Return value of functor object in for_each algorithm - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/684394bf92375bf6?hl=en
* C++ way to convert ASCII digits to Integer? - 4 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/c6620161a9dfea0b?hl=en
* How can I send a file through socket? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/27ac5829b78bc4d5?hl=en
* The best way to retrieve a returned value... by const reference? - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/0f3ad790abe791fc?hl=en
* Compile Time decision static or member - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/e6210abd5833c758?hl=en
* $16 free shipping,wholesale ed hardy bikini,polo bikini,ca bikini on www.
shoesspring.com - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/00128ef3cffaa31e?hl=en

==============================================================================
TOPIC: static array declaration in flyweight pattern
http://groups.google.com/group/comp.lang.c++/t/b4df4db8ab107e11?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 12:12 am
From: Marcel Müller


pauldepstein@att.net wrote:
>>> Do the int-pointers
>>> initialize to 0 anyway even if this is not made explicit as I did?
>> No, their values are undefined. But since there is another variable
>> _numIcons which seems to store the valid part of _icons, this does not
>> result in undefined behavior.
>
> I have two questions. I realise that POD types are automatically
> initialized to 0 in the case of an uninitialized list but does this
> apply here?

No, this is implementation dependent. Most multi-tasking OS return only
memory that is initialized to zero to avoid security issues. But this
does non necessarily propagate through the C runtime. Some runtimes
initialize the memory to a magic value for debugging purposes.

> I incorrectly said that the array holds members of type
> int*. Is this a POD type? I didn't think so.

All pointer types are simple C style data types.

> However, the array actually holds members of type Icon* where Icon is
> another class. So I don't think the initialization trick you mention
> holds, or does it?

This is defined behavior.

> I suppose my questions are:
> 1) Does the initialization trick Type LargeArray[] = {0}; work
> when Type is the int* type?

Yes.

> 2) Does the same initialization trick work when Type is the
> FairlyComplexClass* type?

Yes, that makes no difference.


But the coding that you have posted does not rely on either of that,
because it does not read any of the pointers in the array without
writing it before. But the implementation has undefined behavior and is
likely to crash at another point. If you call FlyweightFactory::getIcon
with more than MAX_ICONS different names, the array _icons is accessed
out of it's bounds. So the code is simply a very bad design. At least it
should throw an exception in this case.

If you do C++ I strongly recommend to avoid to use pointers to access
non constant arrays. Move to std::vector instead and all of these
problems disappear. And if your application needs a dictionary like the
posted code you should have a look at std::map or std::set too. They may
do almost all of the work you need except for the construction of new
instances.

Furthermore, you should check who own the objects that you have created
with new. In the example one would expect that FlyweightFactory owns the
Icon instances. But it doesn't. The instances are never destroyed. This
might not be a problem if the Icon class does not rely on its destructor
call. But it might become a problem if Icon controls unmanaged resources
like Windows COM objects (or things that are similarly awful).

With respect to the cleanup, it is more clean to use a static instances
of FlyweightFactory instead of a class with only static functions. Then
you have a destructor call of FlyweightFactory where you can delete the
cache content. If you want to ensure that there are no two instances of
FlyweightFactory in memory, you should consider a singleton patten
implementation.


Marcel

==============================================================================
TOPIC: U++ 1254 released
http://groups.google.com/group/comp.lang.c++/t/fa4c5eb109ef8685?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 12:59 am
From: Koldo


Website: http://www.ultimatepp.org
Download: http://code.google.com/p/upp-mirror/downloads/list

U++ is BSD licensed C++ cross-platform rapid application development
suite focused on programmers productivity without sacrificing
runtime performance.

What is new in version 1254:

Library:

- Various improvements in SQL related stuff (SqlPerformScript,
SqlBinary enable for PGSQL)

TheIDE:

- Highlighting of .sch and .sql files
- Find in files now has separate output console
- Select package dialog 'All' option replaced by the selection of more
understandable options, main packages now displayed bold

==============================================================================
TOPIC: High Cohesion and Low Coupling in C++
http://groups.google.com/group/comp.lang.c++/t/d8ed656848516be4?hl=en
==============================================================================

== 1 of 3 ==
Date: Mon, Jun 1 2009 1:49 am
From: nick_keighley_nospam@hotmail.com


On 1 June, 06:25, Pallav singh <singh.pal...@gmail.com> wrote:

> Q How to get High Cohesion and Low Coupling, while designing  in C++ ?

use OO. Refactor mercilessly. Read Constantine and Yourdon.


== 2 of 3 ==
Date: Mon, Jun 1 2009 1:49 am
From: "Alf P. Steinbach"


* Pallav singh:
> Q How to get High Cohesion and Low Coupling, while designing in C++ ?

Be intelligent.

Cheers & hth.,

- Alf

--
Due to hosting requirements I need visits to <url: http://alfps.izfree.com/>.
No ads, and there is some C++ stuff! :-) Just going there is good. Linking
to it is even better! Thanks in advance!


== 3 of 3 ==
Date: Mon, Jun 1 2009 2:00 am
From: alasham.said@gmail.com


On Jun 1, 7:25 am, Pallav singh <singh.pal...@gmail.com> wrote:
> Q How to get High Cohesion and Low Coupling, while designing  in C++ ?

Hello,

I believe a complete reply to the above question would require a small
essay. I think therefore that it would be more appropriate for you to
go through some reference material, and then, if needed,ask specific
questions - such as: 'how to reduce local coupling - when one module
modifies or relies on the internal workings of another module'.

http://en.wikipedia.org/wiki/Coupling_(computer_science)
http://en.wikipedia.org/wiki/Cohesion_(computer_science)
http://www.aui.ma/personal/~H.Kabaili/Publications/csmr-2001.pdf

Regards.
A.S.

==============================================================================
TOPIC: C++ Gurus - Is C++ a good choice for public API(s)??? Are there clean
ways to solve known problems there?
http://groups.google.com/group/comp.lang.c++/t/faaac8999a2ece5e?hl=en
==============================================================================

== 1 of 4 ==
Date: Mon, Jun 1 2009 1:55 am
From: nick_keighley_nospam@hotmail.com


On 1 June, 05:55, "Tony" <t...@my.net> wrote:

> Without even reading the body or you post, I suggest you consider "C++ Guru"
> and expand your question to include the out of the box thinkers, for your
> question is a design one rather than a language-specific one, at least to
> some large degree,

this is about the sanest of Tony' recent posts. This probably *is* a
design
issue rather specifically a C++ problem. It certainly needs to deal
with
issues outside the C++ language.

but then...

> I think. When I think of  "C++ Guru", I think of those
> heavily knowledgeable of the C++ standard, who indeed are valuable (if not
> temporary) walking/talking encyclonairies.

... the great Word Salad came upon him and he was <snipped>


--
Nick Keighley


== 2 of 4 ==
Date: Mon, Jun 1 2009 2:02 am
From: nick_keighley_nospam@hotmail.com


Posted to comp.programming in case they have any ideas on clean
public interfaces

On 31 May, 22:19, ariji...@gmail.com wrote:

> I needed to build up a public API for an application at hand.
>
> The data I am modelling maps very well to object oriented design, so I
> am little inclined towards a C++ public API (i.e. my deliverables
> would be a <xyz>.hpp file which will have a bunch of pure virtual
> functions forming the interface and a lib<xyz>.so which will basically
> contain the implementation for those interfaces).

as another poster pointed out your functions aren't virtual.
Do your APIs contain classes?


> But, I can think of 2 problems there:
> 1) How do I guarantee that my shared library will work well with the
> version of the C++ library/compiler my customer/user is having?
> Issue in detail: I mean, I compile my shared library with version 'X'
> of a Std CPP compiler and customer tries to use with version 'Y' of
> StdCPP compiler. And then, if 'X' and 'Y' versions of CPP compiler are
> not compatible, then we get into trouble. We have hit this several
> times with different gcc versions. Just wondering, what is the best/
> cleanest way to solve/get-around this problem?

it's probably insoluable in *any* language. Might it be better
to define an interface in terms of simple structures that are defined
as streams of bytes. Then provide some sort of RPC interface.

You might then look at ASN.1 or XML.

You loose the tight coupling between your application and the client
but gain the huge advantage of loosing the tight...


<snip>

--
Nick Keighley


== 3 of 4 ==
Date: Mon, Jun 1 2009 2:41 am
From: blargg.ei3@gishpuppy.com (blargg)


arijit79@gmail.com wrote:
> I needed to build up a public API for an application at hand.
>
> The data I am modelling maps very well to object oriented design, so I
> am little inclined towards a C++ public API (i.e. my deliverables
> would be a <xyz>.hpp file which will have a bunch of pure virtual
> functions forming the interface and a lib<xyz>.so which will basically
> contain the implementation for those interfaces).
>
> But, I can think of 2 problems there:
> 1) How do I guarantee that my shared library will work well with the
> version of the C++ library/compiler my customer/user is having?
> Issue in detail: I mean, I compile my shared library with version 'X'
> of a Std CPP compiler and customer tries to use with version 'Y' of
> StdCPP compiler. And then, if 'X' and 'Y' versions of CPP compiler are
> not compatible, then we get into trouble. We have hit this several
> times with different gcc versions. Just wondering, what is the best/
> cleanest way to solve/get-around this problem?

Write a C wrapper. If your interface were

class Interface {
public:
virtual int f( double );
};

Interface* new_foo();

you could write a C wrapper as

typedef struct Interface Interface;

Interface* xyz_new_foo( void );
void xyz_delete( Interface* );
int xyz_f( Interface*, double );

and it would be accessible from many languages. If you then wanted C++
users to have a more convenient interface, you could provide a client-side
wrapper for the C interface. :)

> 2) Sometimes it happens that you are working on a C++ based product
> which already has millions of lines of code and then, one fine day a
> requirement comes that a part of that chunk needs to be made accesible
> to users through a shared library. Now, which you work towards
> building that shared library, you may want to ensure that only symbols
> that *should be* exported to users/customers, needs to be exported in
> the shared library, all others un-wanted globals should not be
> exported in the shared library to ensure we don't un-necessarily
> pollute customer's namesapce with whole lot of our internal/global
> symbols. (Note: Ideal solution for this issue, probably would be to
> ensure that we should never pollute our implementation namespace at
> all, in the first place, but as I said, you may not be the one who had
> written all these code and it's a million lines code, and you don't
> have the option/bugdet for re-arch/re-write!). For such a requriement,
> if it was a C library we could typically use 'objcopy' in linux or -M
> compiler option in Solaris, to make sure only a given set of symbols
> (defined by us) are made global. But if it's a C++ library, I wonder
> how to achieve this goal?
[...]

Write a C wrapper.


== 4 of 4 ==
Date: Mon, Jun 1 2009 2:41 am
From: Maxim Yegorushkin


On May 31, 10:19 pm, ariji...@gmail.com wrote:

> I needed to build up a public API for an application at hand.
>
> The data I am modelling maps very well to object oriented design, so I
> am little inclined towards a C++ public API (i.e. my deliverables
> would be a <xyz>.hpp file which will have a bunch of pure virtual
> functions forming the interface and a lib<xyz>.so which will basically
> contain the implementation for those interfaces).
>
> But, I can think of 2 problems there:
> 1) How do I guarantee that my shared library will work well with the
> version of the C++ library/compiler my customer/user is having?
> Issue in detail: I mean, I compile my shared library with version 'X'
> of a Std CPP compiler and customer tries to use with version 'Y' of
> StdCPP compiler. And then, if 'X' and 'Y' versions of CPP compiler are
> not compatible, then we get into trouble. We have hit this several
> times with different gcc versions. Just wondering, what is the best/
> cleanest way to solve/get-around this problem?

If you ship a C++ interface, you will have to provide a different
binary for every different version of OS and compiler your clients
use. This is because C++ ABI differs across compilers and even
compiler versions (e.g. gcc3 vs gcc4, sunCC vs. sunCC -
library=stlport4).

On the other hand, if you ship a C interface, you will only need to
provide different binaries for each OS. This is because C ABI is
stable and your clients can link against your C API using any compiler
for that particular OS.

Note, that you can do OO design in C. For example, a C++ intreface:

struct Foo
{
int doSomething(int);
};

Would look like this in C:

struct Foo; /* incomplete in the public API */
Foo* fooCreate();
void fooDestroy(Foo*);
int fooDoSomething(Foo*, int);


> 2) Sometimes it happens that you are working on a C++ based product
> which already has millions of lines of code and then, one fine day a
> requirement comes that a part of that chunk needs to be made accesible
> to users through a shared library. Now, which you work towards
> building that shared library, you may want to ensure that only symbols
> that *should be* exported to users/customers, needs to be exported in
> the shared library, all others un-wanted globals should not be
> exported in the shared library to ensure we don't un-necessarily
> pollute customer's namesapce with whole lot of our internal/global
> symbols. (Note: Ideal solution for this issue, probably would be to
> ensure that we should never pollute our implementation namespace at
> all, in the first place, but as I said, you may not be the one who had
> written all these code and it's a million lines code, and you don't
> have the option/bugdet for re-arch/re-write!). For such a requriement,
> if it was a C library we could typically use 'objcopy' in linux or -M
> compiler option in Solaris, to make sure only a given set of symbols
> (defined by us) are made global. But if it's a C++ library, I wonder
> how to achieve this goal?

By exposing a C interface, so that your .so only exports the functions
of the public C API, all other symbols are made local or stripped.
(Don't forget to statically prelink your .so with a C++ run-time, so
that your C API .so does not have any unresolved C++ run-time
symbols).

--
Max

==============================================================================
TOPIC: Is this String class properly implemented?
http://groups.google.com/group/comp.lang.c++/t/6d95b63c2d32064a?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 1:56 am
From: Richard Herring


In message <ak2Ul.19671$D32.7129@flpi146.ffdc.sbc.com>, Tony
<tony@my.net> writes
>Richard Herring wrote:
>> In message <g86Sl.11077$im1.8165@nlpi061.nbdc.sbc.com>, Tony
>> <tony@my.net> writes
>>> Richard Herring wrote:
>>>> In message <JFqRl.29705$yr3.16660@nlpi068.nbdc.sbc.com>, Tony
>>>> <tony@my.net> writes
>>>>>
>>>>> "Richard Herring" <junk@[127.0.0.1]> wrote in message
>>>>> news:TI1c$oFG9nEKFwhj@baesystems.com...
>>>>>> In message <lbrQl.10692$im1.4328@nlpi061.nbdc.sbc.com>, Tony
>>>>>> <tony@my.net> writes
>>>>
>>>> [...]
>>>>
>>>>>> I think you need to check the definition of "strawman".
>>>>>
>>>>> Probably, but you know what I meant.
>>>>>
>>>>>>
>>>>>>> that conveniently avoids any context; The English alphabet
>>>>>>> has exactly 26 letters.
>>>>>>
>>>>>> (And the Welsh alphabet has 28, despite lacking J, K, Q, V, X, Z).
>>>>>> So what? 26 letters alone are not sufficient for writing English.
>>>>>
>>>>> Who's talking about literary writings?! I'm talking about
>>>>> programming and engineering.
>>>>
>>>> I'm talking about software-engineering programs that support what my
>>>> customers want -- which includes not having the stuff that they type
>>>> in garbled because it contains characters that aren't in ASCII.
>>>
>>> Politics.
>>
>> So one should alienate the customer and go out of business, because
>> giving them what they contracted for is "politics"? Maybe in your
>> world.
>
>It was politics because you choose to promote your narrow

*My* view is "narrow"? [*] ROFL.

>point of view
>instead of recognizing alternative needs. You seem to be "arguing for
>argument's sake".

P.K.B.

> If my requirements are satisfied with ASCII, then all your
>verbage is bogus.

And the requirements of the rest of the world don't matter. I see.


[*] just to preserve a veneer of topicality:

7-bit ASCII is narrow. UTF-8 is just about narrow. All other
manifestations of Unicode are surely wide, possibly even too wide for
wchar_t.

--
Richard Herring

==============================================================================
TOPIC: Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
http://groups.google.com/group/comp.lang.c++/t/d21c674e9bb9b3ca?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 2:50 am
From: yijeans10@163.com

Footwear cheap wholesaler (paypal payment)( www.niketrade08.cn )
Paul Smith shoes
Jordan shoes
Bape shoes
Chanel shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
D&G shoes
Dior shoes
ED hardy shoes
Evisu shoes
Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Gucci shoes
Hogan shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lv shoes
Prada shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Timberland shoes
Tous shoes
Ugg shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Ice cream shoes
Sebago shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste shoes
Air force one shoes cheap wholesaler (paypal payment)
( www.niketrade08.cn )
TODS shoes
AF shoes

Footwear cheap wholesaler (paypal payment)( www.niketrade08.cn )
Paul Smith shoes
Jordan shoes
Bape shoes
Chanel shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
D&G shoes
Dior shoes
ED hardy shoes
Evisu shoes
Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Gucci shoes
Hogan shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lv shoes
Prada shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Timberland shoes
Tous shoes
Ugg shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Ice cream shoes
Sebago shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste shoes
Air force one shoes cheap wholesaler (paypal payment)
( www.niketrade08.cn )
TODS shoes
AF shoes

Footwear cheap wholesaler (paypal payment)( www.niketrade08.cn )
Paul Smith shoes
Jordan shoes
Bape shoes
Chanel shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
D&G shoes
Dior shoes
ED hardy shoes
Evisu shoes
Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Gucci shoes
Hogan shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lv shoes
Prada shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Timberland shoes
Tous shoes
Ugg shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Ice cream shoes
Sebago shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste shoes
Air force one shoes cheap wholesaler (paypal payment)
( www.niketrade08.cn )
TODS shoes
AF shoes

Footwear cheap wholesaler (paypal payment)( www.niketrade08.cn )
Paul Smith shoes
Jordan shoes
Bape shoes
Chanel shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
D&G shoes
Dior shoes
ED hardy shoes
Evisu shoes
Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Gucci shoes
Hogan shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lv shoes
Prada shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Timberland shoes
Tous shoes
Ugg shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Ice cream shoes
Sebago shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste shoes
Air force one shoes cheap wholesaler (paypal payment)
( www.niketrade08.cn )
TODS shoes
AF shoes

Footwear cheap wholesaler (paypal payment)( www.niketrade08.cn )
Paul Smith shoes
Jordan shoes
Bape shoes
Chanel shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
D&G shoes
Dior shoes
ED hardy shoes
Evisu shoes
Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Gucci shoes
Hogan shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lv shoes
Prada shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Timberland shoes
Tous shoes
Ugg shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Ice cream shoes
Sebago shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste shoes
Air force one shoes cheap wholesaler (paypal payment)
( www.niketrade08.cn )
TODS shoes
AF shoes

Footwear cheap wholesaler (paypal payment)( www.niketrade08.cn )
Paul Smith shoes
Jordan shoes
Bape shoes
Chanel shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
D&G shoes
Dior shoes
ED hardy shoes
Evisu shoes
Fendi shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Gucci shoes
Hogan shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lv shoes
Prada shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Timberland shoes
Tous shoes
Ugg shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Ice cream shoes
Sebago shoes cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste shoes
Air force one shoes cheap wholesaler (paypal payment)
( www.niketrade08.cn )
TODS shoes
AF shoes

==============================================================================
TOPIC: D&G T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
http://groups.google.com/group/comp.lang.c++/t/2a53bb936cc6a59b?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 2:51 am
From: yijeans10@163.com

wholesale Lacoste polo t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste t shirt solid color cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste sweater cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph lauren cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph Lauren polo cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Polo cheap wholesaler (paypal payment)( www.niketrade08.cn )
wholesale Ralph lauren polo t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph lauren t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Abercrombie & fitch shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Burberry shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Burberry t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale NBA sports jersey cheap wholesaler (paypal payment)
( www.niketrade08.cn )


T-Shirts
AFF T-shirt
ARMANI T-shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
BAPE T-shirt
BBC T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
BOSS T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
Burberry T-shirt
CA T-shirt men's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
CA T-shirt women's
COOGI T-shirt
CRYSTAL ROCK women's
D&G T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
DIESEL T-shirt
DSQUARED T-shirt men's
DSQUARED T-shirt women's
Eck? Unltd T-shirt
ED T-shirt men's
ED T-shirt women's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
EVISU T-shirt
GGG T-shirt
G-STAR T-shirt
HLST T-Shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste T-shirt
Lacoste T-shirt women's
LRG T-shirt
O&L T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
POLO 3 T-shirt
POLO 4 T-shirt
POLO 5 T-shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
POLO T-shirt men's
POLO T-shirt women's
Prada T-shirt
RUEHL T-Shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
SMET T-Shirt men's
SMET T-Shirt women's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
VERSACE T-shirt
A&F Abercrombie & Fitch T-shirt men's
A&F Abercrombie & Fitch T-shirt women's


wholesale Lacoste polo t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste t shirt solid color cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste sweater cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph lauren cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph Lauren polo cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Polo cheap wholesaler (paypal payment)( www.niketrade08.cn )
wholesale Ralph lauren polo t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph lauren t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Abercrombie & fitch shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Burberry shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Burberry t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale NBA sports jersey cheap wholesaler (paypal payment)
( www.niketrade08.cn )


T-Shirts
AFF T-shirt
ARMANI T-shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
BAPE T-shirt
BBC T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
BOSS T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
Burberry T-shirt
CA T-shirt men's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
CA T-shirt women's
COOGI T-shirt
CRYSTAL ROCK women's
D&G T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
DIESEL T-shirt
DSQUARED T-shirt men's
DSQUARED T-shirt women's
Eck? Unltd T-shirt
ED T-shirt men's
ED T-shirt women's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
EVISU T-shirt
GGG T-shirt
G-STAR T-shirt
HLST T-Shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste T-shirt
Lacoste T-shirt women's
LRG T-shirt
O&L T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
POLO 3 T-shirt
POLO 4 T-shirt
POLO 5 T-shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
POLO T-shirt men's
POLO T-shirt women's
Prada T-shirt
RUEHL T-Shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
SMET T-Shirt men's
SMET T-Shirt women's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
VERSACE T-shirt
A&F Abercrombie & Fitch T-shirt men's
A&F Abercrombie & Fitch T-shirt women's

wholesale Lacoste polo t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste t shirt solid color cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste sweater cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Lacoste cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph lauren cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph Lauren polo cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Polo cheap wholesaler (paypal payment)( www.niketrade08.cn )
wholesale Ralph lauren polo t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Ralph lauren t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Abercrombie & fitch shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Burberry shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale Burberry t shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
wholesale NBA sports jersey cheap wholesaler (paypal payment)
( www.niketrade08.cn )


T-Shirts
AFF T-shirt
ARMANI T-shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
BAPE T-shirt
BBC T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
BOSS T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
Burberry T-shirt
CA T-shirt men's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
CA T-shirt women's
COOGI T-shirt
CRYSTAL ROCK women's
D&G T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
DIESEL T-shirt
DSQUARED T-shirt men's
DSQUARED T-shirt women's
Eck? Unltd T-shirt
ED T-shirt men's
ED T-shirt women's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
EVISU T-shirt
GGG T-shirt
G-STAR T-shirt
HLST T-Shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
Lacoste T-shirt
Lacoste T-shirt women's
LRG T-shirt
O&L T-shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
POLO 3 T-shirt
POLO 4 T-shirt
POLO 5 T-shirt cheap wholesaler (paypal payment)
( www.niketrade08.cn )
POLO T-shirt men's
POLO T-shirt women's
Prada T-shirt
RUEHL T-Shirt cheap wholesaler (paypal payment)( www.niketrade08.cn )
SMET T-Shirt men's
SMET T-Shirt women's cheap wholesaler (paypal payment)
( www.niketrade08.cn )
VERSACE T-shirt
A&F Abercrombie & Fitch T-shirt men's
A&F Abercrombie & Fitch T-shirt women's

==============================================================================
TOPIC: discount wholesaler Air Max 88 shoes (paypal payment)( www.niketrade08.
cn )
http://groups.google.com/group/comp.lang.c++/t/32d858d32cb3fedf?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 2:51 am
From: yijeans10@163.com


discount wholesaler Air max 95 shoes (paypal payment)
( www.niketrade08.cn )
wholesale Air Max 87 shoes
discount wholesaler Air MAX LTD shoes
sell Air max 90 shoes
discount wholesaler Air Max 88 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler Air MAX 89 shoes
discount wholesaler Air max tn shoes
discount wholesaler Air Max tn8 shoes
discount wholesaler Air MAX tn9 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler MEN'S WOMEN'S Shox R5 R4 trainers
discount wholesaler Men's women's shocks OZ NZ TL trainers
For more products pls visit: (paypal payment)( www.niketrade08.cn )


discount wholesaler Air max 95 shoes (paypal payment)
( www.niketrade08.cn )
wholesale Air Max 87 shoes
discount wholesaler Air MAX LTD shoes
sell Air max 90 shoes
discount wholesaler Air Max 88 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler Air MAX 89 shoes
discount wholesaler Air max tn shoes
discount wholesaler Air Max tn8 shoes
discount wholesaler Air MAX tn9 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler MEN'S WOMEN'S Shox R5 R4 trainers
discount wholesaler Men's women's shocks OZ NZ TL trainers
For more products pls visit: (paypal payment)( www.niketrade08.cn )


discount wholesaler Air max 95 shoes (paypal payment)
( www.niketrade08.cn )
wholesale Air Max 87 shoes
discount wholesaler Air MAX LTD shoes
sell Air max 90 shoes
discount wholesaler Air Max 88 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler Air MAX 89 shoes
discount wholesaler Air max tn shoes
discount wholesaler Air Max tn8 shoes
discount wholesaler Air MAX tn9 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler MEN'S WOMEN'S Shox R5 R4 trainers
discount wholesaler Men's women's shocks OZ NZ TL trainers
For more products pls visit: (paypal payment)( www.niketrade08.cn )


discount wholesaler Air max 95 shoes (paypal payment)
( www.niketrade08.cn )
wholesale Air Max 87 shoes
discount wholesaler Air MAX LTD shoes
sell Air max 90 shoes
discount wholesaler Air Max 88 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler Air MAX 89 shoes
discount wholesaler Air max tn shoes
discount wholesaler Air Max tn8 shoes
discount wholesaler Air MAX tn9 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler MEN'S WOMEN'S Shox R5 R4 trainers
discount wholesaler Men's women's shocks OZ NZ TL trainers
For more products pls visit: (paypal payment)( www.niketrade08.cn )


discount wholesaler Air max 95 shoes (paypal payment)
( www.niketrade08.cn )
wholesale Air Max 87 shoes
discount wholesaler Air MAX LTD shoes
sell Air max 90 shoes
discount wholesaler Air Max 88 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler Air MAX 89 shoes
discount wholesaler Air max tn shoes
discount wholesaler Air Max tn8 shoes
discount wholesaler Air MAX tn9 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler MEN'S WOMEN'S Shox R5 R4 trainers
discount wholesaler Men's women's shocks OZ NZ TL trainers
For more products pls visit: (paypal payment)( www.niketrade08.cn )


discount wholesaler Air max 95 shoes (paypal payment)
( www.niketrade08.cn )
wholesale Air Max 87 shoes
discount wholesaler Air MAX LTD shoes
sell Air max 90 shoes
discount wholesaler Air Max 88 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler Air MAX 89 shoes
discount wholesaler Air max tn shoes
discount wholesaler Air Max tn8 shoes
discount wholesaler Air MAX tn9 shoes (paypal payment)
( www.niketrade08.cn )
discount wholesaler MEN'S WOMEN'S Shox R5 R4 trainers
discount wholesaler Men's women's shocks OZ NZ TL trainers
For more products pls visit: (paypal payment)( www.niketrade08.cn )

==============================================================================
TOPIC: wxWidgets and WYSIWYG forms creator clues
http://groups.google.com/group/comp.lang.c++/t/78b24a3ec8111979?hl=en
==============================================================================

== 1 of 2 ==
Date: Mon, Jun 1 2009 3:47 am
From: "Piotrek G."


Hi!

I've just found wxWidgets and i think it's pretty cool stuff to code
"almost-native" (as it's win32 api wrapped code, mostly) win32
application in C++.

But i wonder whether there's some widget, or add-on, to wxWidgets which
allow to create nice auto-hiding panels? I was 'googling' and i've found
'Xtreme DockingPane' but it's not that what i want actually, as it
supposed to be free GPL (BSD maybe) licence.

That's what i have so far:
- wx-Dev-C++ - nice stuff...
- wx-AUI - pretty panels, dockable menus and so on

What I'm looking for:
- _Clues_ concerning free WYSIWYG forms creators for win32 and C++
- _Free_widget_to_create_auto-hiding_panels.

My main goals:
1. Have WYSIWYG forms creator - I want to focus on application
purposes, not on GUI creation with win32 api.

2. Produce commercial software using GPL licenced soft until i'll
manage to buy some commercial stuff
2b. BTW which one of commercial RAD's can provide me with all needed
(mentioned above) features? (Borland C++? MS Visual C++ doesn't have
WYSIWIG form maker for native win32 api and C++. Something else?)

3. Write quite low-level applications using C++. No CLR, Virual
Machines and so on. I think dotNet and C# is great, but i don't want to
use it yet. It's too heavy, i think - starting entire CLR just to run a
simple calculator application for instance...


If i missed the group and my post should go somewhere else, please point
me to the right one.

Thank you!
Piotr

--
Piotrek G.


== 2 of 2 ==
Date: Mon, Jun 1 2009 4:55 am
From: Lionel B


On Mon, 01 Jun 2009 12:47:23 +0200, Piotrek G. wrote:

> Hi!
>
> I've just found wxWidgets and i think it's pretty cool stuff to code
> "almost-native" (as it's win32 api wrapped code, mostly) win32
> application in C++.

[...]

> If i missed the group and my post should go somewhere else, please point
> me to the right one.

This group is for C++ language issues only... try:

http://www.wxwidgets.org/support/

for forums and mailing lists (Google not working for you?)

--
Lionel B

==============================================================================
TOPIC: C++ stuff I can't talk about here
http://groups.google.com/group/comp.lang.c++/t/5017e5dbab2a63a3?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 3:51 am
From: Christof Donat


Hi,

> My wireless keyboard makes me seem stupid sometimes.

Get a new Keyboard - though I wouldn't expect that to improve things a
lot.

Christof

==============================================================================
TOPIC: Return value of functor object in for_each algorithm
http://groups.google.com/group/comp.lang.c++/t/684394bf92375bf6?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 3:58 am
From: James Kanze


On May 31, 3:17 pm, Jerry Coffin <jcof...@taeus.com> wrote:
> In article <5602b353-1abd-411d-965b-
> af68c9fdc...@s21g2000vbb.googlegroups.com>, james.ka...@gmail.com
> says...

> [ ... ]
> > In general, it's best to make all copies of functional objects
> > idempotent, using an additional level of indirection if
> > necessary. For functional objects with mutable state, there are
> > two more or less standard solutions:

> > -- The client defines an instance of the state, and passes an
> > address of it to the constructor of the functional object,
> > which contains a pointer to it. This is the simplest and
> > most efficient solution; if there is mutable state which the
> > client doesn't need to know about, however, it breaks
> > encapsulation.

> > -- The functional object defines a nested class type with
> > state. The non-copy constructors allocate an instance of
> > the state dynamically, and the functional object uses
> > reference counting (boost::shared_ptr works fine here,
> > although other reference counted pointers may be more
> > efficient) so that copies share the instance of the state.

> Option C: Consider using std::accumulate instead of
> std::for_each. Most times that people want to maintain state
> across invocations, they're accumulating something in their
> functor, and they'd be better off using std::accumulate to do
> the job.

Good point. There are exceptions, but as you say, most of the
time...

There is one potential problem with accumulate: it uses accu =
accu + value, rather than accu += value. If the accumulator is
expensive to copy, this can be costly. I don't have the figures
handy, but I know that when I designed my SHA-n classes, my
original use, using the hasher directly as an accumulator, was
too slow, and this despite the fact that I had designed the
class to optimize copying (all members basic types, so that
hopefully, the compiler generated copy constructor could be
optimal). In the end, I added a special "hack"; an operator
which implemented in fact += (or the moral equivalent), rather
than +, then returned a dummy type, to pick up a no-op
assignment operator. (There's still the copy into accumulate,
and the copy on return, but they're insignificant if the block
is long enough.) It works with all of the implementations I've
used. And I think the standard can be interpreted as requiring
it to work. But I still feel like it's skating on thin ice.

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

==============================================================================
TOPIC: C++ way to convert ASCII digits to Integer?
http://groups.google.com/group/comp.lang.c++/t/c6620161a9dfea0b?hl=en
==============================================================================

== 1 of 4 ==
Date: Mon, Jun 1 2009 4:03 am
From: James Kanze


On May 31, 4:22 pm, "osmium" <r124c4u...@comcast.net> wrote:
> James Kanze wrote:
> > On May 29, 3:08 pm, Gerhard Fiedler <geli...@gmail.com> wrote:
> >> James Kanze wrote:
> >>> (Given that ASCII is for all intents and purposes dead, it's
> >>> highly unlikely that they really want ASCII.)

> >> I'm not sure, but I think in the USA there is quite a number
> >> of programmers who don't think beyond ASCII when thinking of
> >> text manipulation.

> > In just about every country, there are quite a number of
> > programmers who don't think:-). The fact remains that the
> > default encoding used by the system, even when configured for
> > the US, is not ASCII. Even if you're not "thinking" beyond
> > ASCII, your program must be capable of reading non-ASCII
> > characters (if only to recognize them and signal the error).

> Is it your point that an ASCII compliant environment would
> have to signal an error if the topmost bit in a byte was
> something other than 0?

My point is that the actual bytes you'll be reading may contain
non-ASCII characters, whether you like it or not, and that your
program has to handle them in order to be correct. (Of course,
lots of programs limit their input. None of my programs which
deal with text, for example, allow control characters like STX
or DC1; such a character in the input will trigger an error. As
will an illegal UTF-8 sequence, if the program is inputting
UTF-8.)

> Or do you have something else in mind? I don't have the
> *actual* ASCII standard available but I would be surprised if
> that was expressed as a *requirement*. After all, the people
> that wrote the standard were well aware that there was no such
> thing as a seven-bit machine.

ASCII defined code points in the range 0-127. Any other value
is not ASCII. (And the usual arrangement on a PDP-10 was 5
seven bit bytes in a 36 bit word, with one bit left over.)

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34


== 2 of 4 ==
Date: Mon, Jun 1 2009 4:10 am
From: James Kanze


On May 31, 4:52 pm, "Alf P. Steinbach" <al...@start.no> wrote:
> * osmium:
> > James Kanze wrote:

> >> On May 29, 3:08 pm, Gerhard Fiedler <geli...@gmail.com> wrote:
> >>> James Kanze wrote:
> >>>> (Given that ASCII is for all intents and purposes dead, it's
> >>>> highly unlikely that they really want ASCII.)
> >>> I'm not sure, but I think in the USA there is quite a number
> >>> of programmers who don't think beyond ASCII when thinking of
> >>> text manipulation.
> >> In just about every country, there are quite a number of
> >> programmers who don't think:-). The fact remains that the
> >> default encoding used by the system, even when configured for
> >> the US, is not ASCII. Even if you're not "thinking" beyond
> >> ASCII, your program must be capable of reading non-ASCII
> >> characters (if only to recognize them and signal the error).

> > Is it your point that an ASCII compliant environment would
> > have to signal an error if the topmost bit in a byte was
> > something other than 0?

> I think James is perhaps referring to routines like isdigit
> family.

> Some of them take int argument and have UB if the argument
> value is outside 0...(unsigned char)(-1).

s/Some/All/

The standard says 0...UCHAR_MAX or EOF. But UCHAR_MAX and
(unsigned char)(-1) are, of course, guaranteed to be equal. And
EOF is guaranteed to be negative, so there can never be any
ambiguity between one of the characters and EOF.

> So with most implementations you get UB if you simply pass a
> char directly as argument and that char is beyond ASCII range,
> because then it will be negative.

That is, of course, something that you always have to consider.
The "official" answer, in C++, is to use the corresponding
functions in <locale>. Which have been carefully designed to be
even more verbose than the C function with the cast, and to run
several orders of magnitude slower. (But other than that,
they're fine.)

> > After all, the people that wrote the standard were well
> > aware that there was no such thing as a seven-bit machine.

> On the contrary, the seven bit nature of ASCII was to
> facilitate communication over e.g. serial links with software
> parity check, where each byte was effectively seven bits
> (since one bit was used for parity).

I'm not sure what the original rationale was. One mustn't
forget that at the time, six bit codes were quite commun.
Moving to seven bits probably seemed to be the minimum solution
to support both upper case and lower. And that given the
transmission speeds at the time (110 baud for a teletype), every
bit gained helped. But the fact that you could put the
character with parity into an octet was probably a consideration
as well.

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34


== 3 of 4 ==
Date: Mon, Jun 1 2009 4:14 am
From: James Kanze


On May 31, 4:54 pm, "Alf P. Steinbach" <al...@start.no> wrote:
> * Alf P. Steinbach:

> Forgot to add, one of the early PDPs had, as I recall,
> configurable byte size... :-)

Programmable. The PDP-10 was word addressed, with special
instructions to access bytes. The "byte address" used some of
the high order bits to specify the bit offset of the byte in the
word, and the number of bits in the byte. Incrementing a "byte
pointer" added the number of bits to the bit offset, and if the
result was more than 36-number of bits, incremented base address
and set the bit offset to 0.

The fact that the bit offset was in the high bits led to another
interesting effect:
assert( (unsigned)( p + 1 ) > (unsigned)( p ) ) ;
would often fail if p was a char*.

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34


== 4 of 4 ==
Date: Mon, Jun 1 2009 5:09 am
From: "Alf P. Steinbach"


* James Kanze:
> On May 31, 4:52 pm, "Alf P. Steinbach" <al...@start.no> wrote:
>> * osmium:
>>> James Kanze wrote:
>
>>>> On May 29, 3:08 pm, Gerhard Fiedler <geli...@gmail.com> wrote:
>>>>> James Kanze wrote:
>>>>>> (Given that ASCII is for all intents and purposes dead, it's
>>>>>> highly unlikely that they really want ASCII.)
>>>>> I'm not sure, but I think in the USA there is quite a number
>>>>> of programmers who don't think beyond ASCII when thinking of
>>>>> text manipulation.
>>>> In just about every country, there are quite a number of
>>>> programmers who don't think:-). The fact remains that the
>>>> default encoding used by the system, even when configured for
>>>> the US, is not ASCII. Even if you're not "thinking" beyond
>>>> ASCII, your program must be capable of reading non-ASCII
>>>> characters (if only to recognize them and signal the error).
>
>>> Is it your point that an ASCII compliant environment would
>>> have to signal an error if the topmost bit in a byte was
>>> something other than 0?
>
>> I think James is perhaps referring to routines like isdigit
>> family.
>
>> Some of them take int argument and have UB if the argument
>> value is outside 0...(unsigned char)(-1).
>
> s/Some/All/
>
> The standard says 0...UCHAR_MAX or EOF. But UCHAR_MAX and
> (unsigned char)(-1) are, of course, guaranteed to be equal. And
> EOF is guaranteed to be negative, so there can never be any
> ambiguity between one of the characters and EOF.
>
>> So with most implementations you get UB if you simply pass a
>> char directly as argument and that char is beyond ASCII range,
>> because then it will be negative.
>
> That is, of course, something that you always have to consider.
> The "official" answer, in C++, is to use the corresponding
> functions in <locale>. Which have been carefully designed to be
> even more verbose than the C function with the cast, and to run
> several orders of magnitude slower. (But other than that,
> they're fine.)

It's the first time I can say we're on completely same wavelength. He he. :-)


>>> After all, the people that wrote the standard were well
>>> aware that there was no such thing as a seven-bit machine.
>
>> On the contrary, the seven bit nature of ASCII was to
>> facilitate communication over e.g. serial links with software
>> parity check, where each byte was effectively seven bits
>> (since one bit was used for parity).
>
> I'm not sure what the original rationale was. One mustn't
> forget that at the time, six bit codes were quite commun.
> Moving to seven bits probably seemed to be the minimum solution
> to support both upper case and lower. And that given the
> transmission speeds at the time (110 baud for a teletype), every
> bit gained helped. But the fact that you could put the
> character with parity into an octet was probably a consideration
> as well.

Yeah, I think perhaps that was 20-20 hindsight rationalization. Now that I try
to shake and rattle old memory cubes a little, they spit out some vague
recollection of using 7-bit serial comms without any parity.


Cheers,

- Alf

--
Due to hosting requirements I need visits to <url: http://alfps.izfree.com/>.
No ads, and there is some C++ stuff! :-) Just going there is good. Linking
to it is even better! Thanks in advance!

==============================================================================
TOPIC: How can I send a file through socket?
http://groups.google.com/group/comp.lang.c++/t/27ac5829b78bc4d5?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 4:17 am
From: James Kanze


On May 31, 9:36 pm, Marcel Müller <news.5.ma...@spamgourmet.com>
wrote:
> James Kanze wrote:
> > If you have a big enough buffer. The usual solution is to
> > read fixed sized blocks, processing each block before
> > reading the next. (A professional program will usually use
> > a pool of buffers and non-blocking reads, but that requires
> > some system dependent code.)

> With a look to C++0x this should change, since a second thread
> may do the job without the need for an asynchronous I/O API.

That's basically what I was suggesting, no. The thread doing
the processing doesn't block for the read. Using threads is
probably the simplest way to do it, although I suspect using the
system levelo asynchronous IO might be slightly more efficient.

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

==============================================================================
TOPIC: The best way to retrieve a returned value... by const reference?
http://groups.google.com/group/comp.lang.c++/t/0f3ad790abe791fc?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 4:52 am
From: "Niels Dekker - no return address"


>> Virtual functions are here to stay, and I don't think it's "in
>> general" bad practice to return an object "by-value" whose
>> type has virtual functions.

James Kanze wrote:
> "In general", a type which is part of an inheritance hierarchy
> shouldn't support copy and assignment.

Thanks, James. But personally I think it's okay for a "leaf" of an
inheritance hierarchy (a type that should be considered "sealed") to be
CopyConstructible.

> Most of the time,
> objects which support inheritance will have identity.
> (Do not the extensive qualifiers in the above.

I'm sorry I don't really understand the above. Please explain!

> There are certainly exceptions, and not a few.)

Like std::exception? ;-)


Kind regards, Niels

==============================================================================
TOPIC: Compile Time decision static or member
http://groups.google.com/group/comp.lang.c++/t/e6210abd5833c758?hl=en
==============================================================================

== 1 of 2 ==
Date: Mon, Jun 1 2009 5:18 am
From: Anees


Dear Fellows:

I have following scenario:

class A {
public:
void me_print () { cout << "A" << endl; }
static void print() { cout << "static A" << endl; }
};

class B {
};

class C : public A, public B {
public:
void foo() { PRINT; }
};

class D: public B {
public:
void foo() { PRINT; }
};


int _tmain(int argc, _TCHAR* argv[])
{
C c;
D d;

c.foo();
d.foo();

return 0;
}

I want to define a macro (#define) such that when instance of A's
derived class (i.e. C) call PRINT; it gets A's member method me_print
(), and when instance of NON A's derived class (i.e. D) call PRINT, it
should be resolved to A's static subroutine print().

Thank you.


Regards,

Anees Haider


== 2 of 2 ==
Date: Mon, Jun 1 2009 5:42 am
From: Maxim Yegorushkin


On Jun 1, 1:18 pm, Anees <anees.hai...@gmail.com> wrote:
> Dear Fellows:
>
> I have following scenario:
>
> class A {
> public:
>         void me_print () { cout << "A" << endl; }
>         static void print() { cout << "static A" << endl; }
>
> };
>
> class B {
>
> };
>
> class C : public A, public B {
> public:
>         void foo() { PRINT; }
>
> };
>
> class D: public B {
> public:
>         void foo() { PRINT; }
>
> };
>
> int _tmain(int argc, _TCHAR* argv[])
> {
>         C c;
>                 D d;
>
>                 c.foo();
>                 d.foo();
>
>                 return 0;
>
> }
>
> I want to define a macro (#define) such that when instance of A's
> derived class (i.e. C) call PRINT; it gets A's member method me_print
> (), and when instance of NON A's derived class (i.e. D) call PRINT, it
> should be resolved to A's static subroutine print().

You don't need a macro for that, you can do that in pure C++ (for
clarity, I changed class to struct and removed all public keywords):

struct A {
void me_print () { std::cout << "A\n"; }
static void print() { std::cout << "static A\n"; }
};

void do_print(A* a) { a->me_print(); }
void do_print(void*) { A::print(); }

struct B {};

struct C : A, B {
void foo() { do_print(this); }
};

struct D : B {
void foo() { do_print(this); }
};

int main()
{
C c;
D d;
c.foo();
d.foo();
}

The idea here is that there are two overloads of do_print(). One takes
A*, the other one void*. The first one is chosen when you pass A* or
its publicly derived sub-class pointer. The void* overload is chosen
for all other pointers.

--
Max

==============================================================================
TOPIC: $16 free shipping,wholesale ed hardy bikini,polo bikini,ca bikini on
www.shoesspring.com
http://groups.google.com/group/comp.lang.c++/t/00128ef3cffaa31e?hl=en
==============================================================================

== 1 of 1 ==
Date: Mon, Jun 1 2009 5:20 am
From: footwear world trade


Sneaker Wholesale ,diesel jeans,paul smith,red
monkey jeans,5ive jungle hoody,AMANI shirt,antik jeans
(www.shoesspring.com)

Sneaker Wholesale ,enyce jeans,roca wear,lrg
jeans,hoodie,shirt,polo t-shirt,evise hoody,coat,ED hardy
(www.shoesspring.com)

Sneaker wholesale ,hoody,skirt,BBC
hoody,jeans,shirt,10deep jeans,shirt,AK t-shirt,LA t-shirt,new york
city t-shirt,kidrobot hoody, (www.shoesspring.com)

Sneaker Wholesale ,ugg shirt,hoodies,jeans,APE
jeans,hoody,F1 coat shirt,Gucci jeans,hoody,shirt,BRM shirt,G-STAV
shirt,T y-shirt, (www.shoesspring.com)

Sneaker Wholesale ,D&G jeans,shirt,Artful Dudger
shirt,hoody (www.shoesspring.com)

Sneaker Wholesale ,backpack,purse,Adidas
bag,cover nut,NIKE bag,GIORGIO handbag,CHLOE handbag,CHENEL
handbag,LV
handbag,coach (www.shoesspring.com)

Sneaker Wholesale ,football club
hat,adidas,puma,new bape,lrg ,evisu,new era, NBA , nike,new
era ,A&F,usa , gucci hat,bape, ED hardy (www.shoesspring.com)

Sneaker Wholesale ,Air Force One,Air
Jordans1-22, Jordan2.2,Jordan2.5,3.5,4.5, 6.5,7.5,13.5,15.5,21.5.
(www.shoesspring.com)


Sneaker Wholesale, Air Max90, 95,97,Air Max95
360, Air Max 180,women Air Max95,97 ,Air max TN.
(www.shoesspring.com)


Sneaker Wholesale ,Bape,Dunk, Shox,
Adidas,Football shoes,Jame,Kobe,Junior Series,Puma,
(www.shoesspring.com)

Sneaker wholesale ,Prada,Women Jordan,LV shoes,
Fashion baboosh,Lacoste shoes,gucci,Chanel.
(www.shoesspring.com)

Sneaker Wholesale ,sand shoes,D&G,high-heel
shoes,NBA,NIKE,soccer,Max one,converse, (www.shoesspring.com)


Sneaker Wholesale ,bape hoodies,jacket,dust
coat,shirt, CLH hoody, rmc jeans,short jeans,lacoast shirt,
(www.shoesspring.com)


Sneaker Wholesale ,diesel jeans,paul smith,red
monkey jeans,5ive jungle hoody,AMANI shirt,antik jeans
(www.shoesspring.com)


Sneaker Wholesale ,enyce jeans,roca wear,lrg
jeans,hoodie,shirt,polo t-shirt,evise hoody,coat,ED hardy
(www.shoesspring.com)


Get nike shoes at wholesale cheap price

wholesale discount nike air (paypal payment) (www.shoesspring.com)

cheapest nike air max90 shoes (paypal payment)
(www.shoesspring.com)
nike maxltd shoes

cheap gucci sneakers,prada sneakers (www.shoesspring.com)

cheap jordan sneakers (www.shoesspring.com)


==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.c++"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.c++?hl=en

To unsubscribe from this group, send email to comp.lang.c+++unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.c++/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

No comments: