Friday, June 5, 2009

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

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

comp.lang.c++@googlegroups.com

Today's topics:

* Extensibility - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/t/b6077d0cb7674d57?hl=en
* 。◕‿◕。wholesale Many brand Sunglass,goggle Exempt freight Stock paypal
payment guoshitrade.com - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/afe5772c23a0ebf7?hl=en
* Questions about the behavior for argv(0) - 3 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/b389eb025fc6bf1f?hl=en
* www.guomeitrade.com wholesale Many brand CAP paypal payment Exempt freight
Stock - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/c4bfae90752da9e4?hl=en
* C++ Land's Map - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/27bb399298c01a2a?hl=en
* Testing for very small doubles with DBL_EPSILON and _isnan() - 2 messages, 2
authors
http://groups.google.com/group/comp.lang.c++/t/bea467633f74d770?hl=en
* Would anyone please analyze the array problem to me please? - 3 messages, 3
authors
http://groups.google.com/group/comp.lang.c++/t/893b9ace89539812?hl=en
* Lacoste Womens Solid Stretch Polo - Cheap - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/373ba242d0f01c71?hl=en
* Beginner Needs A Path To Guru - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/9ecc2898dcd43494?hl=en
* Why am I so stupid? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/9c35ffbaed42a937?hl=en
* Erase map item via a const_iterator - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/9e8b3cac7f8c6976?hl=en
* Can ifstream read file more than 2G? - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/82772d1b68681e35?hl=en
* Member function pointers - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/6885a3ff6204f78f?hl=en
* Wholesale cheap coach shoes, cheap lv shoes online - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/ba1706135f3c9b29?hl=en
* Wholesale coach shoes, cheap coach shoes free shipping www.sellairjordan23.
com - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/1789f1305285e365?hl=en
* Christian Audigier(CA) hoodies,wholesale CA t-shirts,CA shoes,Christian
Audigier hats ( www.topsellingnow.com ) - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/3037221167109745?hl=en
* cheap Air Jordan 5 x Air Force one Fusion (www.topsellingnow.com) discount
Air Jordan 4 x Air Force one Fusion - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/b0dadb3bbdc00c1a?hl=en
* Wholesale cheap Gucci D&G prada lv Hogan chanel coach dior burberry
timberland - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/e0fbca744c87d330?hl=en

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

== 1 of 3 ==
Date: Thurs, Jun 4 2009 2:42 pm
From: Victor Bazarov


sandeep wrote:
> Word,
>
> When ur implementing extensible templates, do u think it's better to do it
> via inheritance or traits? What are the pros and cons?

And the reasons u put f-ups 2 comp.lang.c R...?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


== 2 of 3 ==
Date: Thurs, Jun 4 2009 3:15 pm
From: Flash Gordon


sandeep wrote:
> Word,
>
> When ur implementing extensible templates, do u think it's better to do it
> via inheritance or traits? What are the pros and cons?


Based on the fact that this is obviously a C++ question cross-posted
between comp.lang.c and comp.lang.c++ with follow-ups to comp.lang.c I
strongly suspect it is an attempt to flood comp.lang.c with C++ posts.
Would those in comp.lang.c++ please bare this in mind and watch where
their posts are going.

Thanks.
--
Flash Gordon


== 3 of 3 ==
Date: Thurs, Jun 4 2009 3:31 pm
From: Keith Thompson


sandeep <nospam@nospam.com> writes:
> When ur implementing extensible templates, do u think it's better to do it
> via inheritance or traits? What are the pros and cons?

The OP redirected followups to comp.lang.c; please post any followups
only to comp.lang.c++ instead.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

==============================================================================
TOPIC: 。◕‿◕。wholesale Many brand Sunglass,goggle Exempt freight Stock paypal
payment guoshitrade.com
http://groups.google.com/group/comp.lang.c++/t/afe5772c23a0ebf7?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 4:16 pm
From: "www.salewto.com"


wholesale Many brand Sunglass,goggle Exempt freight Stock paypal
payment www.guoshitrade.com
Sunglass:

wholesale ADIDAS Sunglass www.guoshitrade.com
wholesale ARMANI Sunglass www.guoshitrade.com
wholesale Burberry Sunglass www.guoshitrade.com
wholesale BVLGARL Sunglass www.guoshitrade.com
wholesale Cartier Sunglass www.guoshitrade.com
wholesale CHANEL Sunglass www.guoshitrade.com
wholesale COACH Sunglass www.guoshitrade.com
wholesale D&G Sunglass www.guoshitrade.com
wholesale DIESEL Sunglass www.guoshitrade.com
wholesale DIOR Sunglass www.guoshitrade.com
wholesale ED Hardy Sunglass www.guoshitrade.com
wholesale FENDI Sunglass www.guoshitrade.com
wholesale Ferragamo Sunglass www.guoshitrade.com
wholesale GIVENCHY Sunglass www.guoshitrade.com
wholesale GUCCI Sunglass www.guoshitrade.com
wholesale LV Sunglass www.guoshitrade.com
wholesale NIKE Sunglass www.guoshitrade.com
wholesale Oakley Sunglass www.guoshitrade.com
wholesale POLICE Sunglass www.guoshitrade.com
wholesale PRADA Sunglass www.guoshitrade.com
wholesale Ray.Ban Sunglass www.guoshitrade.com
wholesale ROBERTO CAVALLI Sunglass www.guoshitrade.com
wholesale Salvatore Sunglass www.guoshitrade.com
wholesale VERSACE Sunglass www.guoshitrade.com
wholesale YSL Sunglass www.guoshitrade.com

goggle:

wholesale Armani goggle www.guoshitrade.com
wholesale Catier goggle www.guoshitrade.com
wholesale Chanel goggle www.guoshitrade.com
wholesale D&G goggle www.guoshitrade.com
wholesale DIOR goggle www.guoshitrade.com
wholesale FENDI goggle www.guoshitrade.com
wholesale FERRE goggle www.guoshitrade.com
wholesale FRED goggle www.guoshitrade.com
wholesale GUCCI goggle www.guoshitrade.com
wholesale LV goggle www.guoshitrade.com
wholesale MONT BLANC goggle www.guoshitrade.com
wholesale NIKE goggle www.guoshitrade.com
wholesale Oakley goggle www.guoshitrade.com
wholesale POLICE goggle www.guoshitrade.com
wholesale PRADA goggle www.guoshitrade.com
wholesale PUMA goggle www.guoshitrade.com
wholesale RAY.BAN goggle www.guoshitrade.com
wholesale VERSACE goggle www.guoshitrade.com

==============================================================================
TOPIC: Questions about the behavior for argv(0)
http://groups.google.com/group/comp.lang.c++/t/b389eb025fc6bf1f?hl=en
==============================================================================

== 1 of 3 ==
Date: Thurs, Jun 4 2009 3:42 pm
From: BobF


Nate Eldredge wrote:
> BobF <nothanks@no.spam> writes:
>
>> Nate Eldredge wrote:
>>> Indeed, in the
>>> Unix world, this is the terminology people actually use; the program's
>>> name is independent of filename of its executable. ("If you run this
>>> program with the name 'foo', it does something; if you run it with the
>>> name 'bar', it does something else.")
>> Which Unix world? It's been a while, but IIRC the command typed at
>> the Unix prompt had to match an actual filename.
>>
>> Using your example, I would need two shell scripts (files), one named
>> foo' and the other named 'bar' to invoke a different *binary* with
>> different args to get different behavior between the two runs.
>>
>> However, the scripts themselves are executable ... if you had said
>> binary' instead of 'executable' it would make more sense ... to me.
>
> What I have in mind is running the same binary with two different
> names. This is most commonly done with a hard or soft link.
>
> For instance, on my FreeBSD machine, /usr/bin/sum and /usr/bin/cksum are
> hard links to the same binary. That binary does something like
>
> int main(int argc, char *argv[]) {
> if (strcmp(argv[0], "sum") == 0)
> compute_16_bit_checksum();
> else if (strcmp(argv[0], "cksum") == 0)
> compute_crc32();
> }
>
> So running "sum foo.dat" gives you a 16-bit checksum, while "cksum
> foo.dat" computes a CRC32. This way the two algorithms can share the
> code that they have in common, without needing to duplicate it in two
> binaries or use a shared library.
>
> However, you could also do
>
> execl("/usr/bin/sum", "cksum", "foo.dat", (char *)NULL);
>
> which would also compute a CRC32.

Way Back When, we would accomplish this with "crc -16" and "crc -32".
But things were simpler then and people weren't afraid of simplicity or
c/l args :-)


== 2 of 3 ==
Date: Thurs, Jun 4 2009 5:04 pm
From: Nate Eldredge


BobF <nothanks@no.spam> writes:

> Nate Eldredge wrote:
>> What I have in mind is running the same binary with two different
>> names. This is most commonly done with a hard or soft link.
>
> Way Back When, we would accomplish this with "crc -16" and "crc
> -32". But things were simpler then and people weren't afraid of
> simplicity or c/l args :-)

I hardly think you can accuse early Unix designers of fearing simplicity
or command line arguments.

Rather, originally there was a `sum' command that did one thing.
Someone wanted a different kind of checksum so they wrote a new
command, and it also became standard. Then people realized that the two
programs shared a lot of code and could be merged into one, but invoking
them as `sum' and `cksum' was already established, and changing it would
break scripts. Hence the current solution.


== 3 of 3 ==
Date: Thurs, Jun 4 2009 5:31 pm
From: BobF


Nate Eldredge wrote:
> BobF <nothanks@no.spam> writes:
>
>> Nate Eldredge wrote:
>>> What I have in mind is running the same binary with two different
>>> names. This is most commonly done with a hard or soft link.
>> Way Back When, we would accomplish this with "crc -16" and "crc
>> -32". But things were simpler then and people weren't afraid of
>> simplicity or c/l args :-)
>
> I hardly think you can accuse early Unix designers of fearing simplicity
> or command line arguments.

Nope, I said just the opposite

>
> Rather, originally there was a `sum' command that did one thing.
> Someone wanted a different kind of checksum so they wrote a new
> command, and it also became standard. Then people realized that the two
> programs shared a lot of code and could be merged into one, but invoking
> them as `sum' and `cksum' was already established, and changing it would
> break scripts. Hence the current solution.

I would have used a different approach that would have ultimately
resulted in updated scripts.

In the simplest cases using multiple links to the same file and testing
argv[0] seems fine. IMHO, however, long term maintenance would be much
simpler using explicit args.

To each his own.

==============================================================================
TOPIC: www.guomeitrade.com wholesale Many brand CAP paypal payment Exempt
freight Stock
http://groups.google.com/group/comp.lang.c++/t/c4bfae90752da9e4?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 4:49 pm
From: "www.mall0086.com"


wholesale Many brand CAP Exempt freight Stock paypal payment
www.guomeitrade.com!!!
wholesale A CAP www.guomeitrade.com
wholesale AFF CAP www.guomeitrade.com
wholesale BAPE CAP www.guomeitrade.com
wholesale C CAP www.guomeitrade.com
wholesale CA CAP www.guomeitrade.com
wholesale Cincinnati Reds CAP www.guomeitrade.com
wholesale Colorado Rockies CAP www.guomeitrade.com
wholesale Coogi CAP www.guomeitrade.com
wholesale DC Baseball CAP www.guomeitrade.com
wholesale Detroit Tigers CAP www.guomeitrade.com
wholesale DSQ CAP www.guomeitrade.com
wholesale ED CAP www.guomeitrade.com
wholesale ED Winter hat www.guomeitrade.com
wholesale GUCCI CAP www.guomeitrade.com
wholesale GUCCI Winter hat www.guomeitrade.com
wholesale Houston Astros CAP www.guomeitrade.com
wholesale Jordan CAP www.guomeitrade.com
wholesale Kansas City Royals CAP www.guomeitrade.com
wholesale LA CAP www.guomeitrade.com
wholesale LV CAP www.guomeitrade.com
wholesale Minnesota Twins CAP www.guomeitrade.com
wholesale NBA CAP www.guomeitrade.com
wholesale NEWERA CAP www.guomeitrade.com
wholesale Oakland Athletics CAP www.guomeitrade.com
wholesale P CAP www.guomeitrade.com
wholesale Philadelphia Phillies CAP www.guomeitrade.com
wholesale POLO CAP www.guomeitrade.com
wholesale RED BULL CAP www.guomeitrade.com
wholesale San Diego Padres CAP www.guomeitrade.com
wholesale SF CAP www.guomeitrade.com
wholesale SMET CAP www.guomeitrade.com
wholesale SOX CAP www.guomeitrade.com
wholesale St. Louis Cardinals CAP www.guomeitrade.com
wholesale Texas Rangers CAP www.guomeitrade.com
wholesale Washington Nationals CAP www.guomeitrade.com

==============================================================================
TOPIC: C++ Land's Map
http://groups.google.com/group/comp.lang.c++/t/27bb399298c01a2a?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 4:54 pm
From: Phlip


Marcelo De Brito wrote:

> See it here: http://is.gd/O5zZ

Out-fucking-standing! Past the Tower of Bjarne and the Castle of Alex
Alexandresc- that guy, lies the pastoral villages of Boost, while out to sea are
the roving bands of WTL and ACE...

There's a correct pun in every square centimeter, folks!

==============================================================================
TOPIC: Testing for very small doubles with DBL_EPSILON and _isnan()
http://groups.google.com/group/comp.lang.c++/t/bea467633f74d770?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Jun 4 2009 5:21 pm
From: Olumide <50295@web.de>


Hello,

I recently had a colleague introduce me to the variable macro
DBL_EPSILON and the function _isnan(), because some of my functions
return 1.#QNANO values. However, I'm not sure of of how best to use
DBL_EPSILON and _isnan(). Which is the better way to test for a small
double:

Method 1: _isnan( really_small_double );

Method 2: if( really_small_double < DBL_EPSILON ) // do stuff

Thanks,

- Olumide


== 2 of 2 ==
Date: Thurs, Jun 4 2009 7:30 pm
From: Keith Thompson


Olumide <50295@web.de> writes:
> I recently had a colleague introduce me to the variable macro
> DBL_EPSILON and the function _isnan(), because some of my functions
> return 1.#QNANO values. However, I'm not sure of of how best to use
> DBL_EPSILON and _isnan(). Which is the better way to test for a small
> double:
>
> Method 1: _isnan( really_small_double );
>
> Method 2: if( really_small_double < DBL_EPSILON ) // do stuff

Neither.

C99 has a standard macro isnan(); if your implementation doesn't
support it, it might instead have something similar called "_isnan()".
You'll have to consult your implementation's documentation to find out
exactly what it does. But it almost certainly tests whether its
argument is a NaN -- which stands for "Not a Number". It's not a
really small number; it's not a number at all.

DBL_EPSILON is the difference between 1.0 and the next representable
number above 1.0. Whether that qualifies as "really small" is
something you'll have to decide for yourself. It depends on the
requirements of your application. There is no single answer.

Oh, and (x < DBL_EPSILON) is true for very large negative numbers.

I *think* this applies to both C and C++ (I'm reading and posting in
comp.lang.c), but cross-posts between comp.lang.c and comp.lang.c++
are almost never a good idea.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

==============================================================================
TOPIC: Would anyone please analyze the array problem to me please?
http://groups.google.com/group/comp.lang.c++/t/893b9ace89539812?hl=en
==============================================================================

== 1 of 3 ==
Date: Thurs, Jun 4 2009 6:56 pm
From: kun niu


Dear all,
I've got the following code:
int main()
{
int *a[6][3];
cout<<(a[5]-a[2])<<endl;
cout<<a[5]<<" "<<a[2]<<endl;
return 0;
}
But the output is like this:
9
0xbff44854 0xbff44830
I know that 9 comes from (5-2)*3.
But why is the output here not 36 but 9?

Thanks for any attention and appreciate your answer in advance.


== 2 of 3 ==
Date: Thurs, Jun 4 2009 7:29 pm
From: Sjouke Burry


kun niu wrote:
> Dear all,
> I've got the following code:
> int main()
> {
> int *a[6][3];
> cout<<(a[5]-a[2])<<endl;
> cout<<a[5]<<" "<<a[2]<<endl;
> return 0;
> }
> But the output is like this:
> 9
> 0xbff44854 0xbff44830
> I know that 9 comes from (5-2)*3.
> But why is the output here not 36 but 9?
>
> Thanks for any attention and appreciate your answer in advance.


You have not initialized anything, so what do you expect??
Those variables you used, contain random trash.


== 3 of 3 ==
Date: Thurs, Jun 4 2009 7:58 pm
From: Sam


kun niu writes:

> Dear all,
> I've got the following code:
> int main()
> {
> int *a[6][3];
> cout<<(a[5]-a[2])<<endl;
> cout<<a[5]<<" "<<a[2]<<endl;
> return 0;
> }
> But the output is like this:
> 9
> 0xbff44854 0xbff44830
> I know that 9 comes from (5-2)*3.
> But why is the output here not 36 but 9?
>
> Thanks for any attention and appreciate your answer in advance.

Given the following declaration:

int *a;

With the given declaration, ++a does not increment the address value of 'a'
by 1, but rather by sizeof(int), so that the memory address "++a" points to
the next, following, int in memory.

a+1 returns the same value: not the memory address of 'a' plus 1, but a
memory address of the next int, after 'a'.

Similarly: given two pointers:

int *a, *b;

Presuming that both a and b are pointing to elements of the same array,
the expression (b-a) does not result in the difference between the memory
addresses of b and a, but that difference divided by sizeof(int).

This is so that:

int c=b-a;

This gives the number of ints between a and b, not the number of bytes
between a and b, so that "a+c" returns the same pointer as 'b', or, in other
words:

(b-a) + a == b


==============================================================================
TOPIC: Lacoste Womens Solid Stretch Polo - Cheap
http://groups.google.com/group/comp.lang.c++/t/373ba242d0f01c71?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 8:16 pm
From: tanvon19@gmail.com


Want to buy high quality New Lacoste Womens Solid Stretch Polo
Shirts,please view our store (www.luxury-fashion.org)
Our goods are the fine quality.

You can check them here:
http://www.luxury-fashion.org/static/Apparels/Lacoste-Womens-Solid-Stretch-T-shirts.html
http://www.luxury-fashion.org/static/Apparels/Womens-Solid-Stretch-Shirts-12.html


Welcome check our site and feel free contact us.
Believe You can find what do you want here!


==============================================================================
TOPIC: Beginner Needs A Path To Guru
http://groups.google.com/group/comp.lang.c++/t/9ecc2898dcd43494?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 9:24 pm
From: none


Juha Nieminen wrote:

> none wrote:
>> First, learn assembly.
>
> There's no need to learn assembly. At most, you should study how the
> CPU works and what kind of code a C++ compiler generates under the hood

Good luck studying "how the CPU works" and "what kind of code a C++
compiler generates" without learning assembly. What kind of code does your
C++ compiler generate?


> You can also mostly skip learning C before C++.

Sure, if you don't want to be good at C++. If you don't really care about
writing efficient programs, forget C and C++ alltogether and just stick
with Smalltalk. Or learn Java. Or BASIC.


> C is only going to teach you very bad habits

No, that is not all that C is going to teach you.

Like I said, knowing the progression from assembly to C to C++ is very,
very valuable. If I had to choose between to new-hire candidates, and all
that I knew about them was that candidate A learned C++ from a book and
could talk all day long about virtual-abstract-inheritance-iterator-
templates, while candidate B had written assembly code for a Commodore 64,
I would hire candidate B every single time, without even asking him one
interview question about high-level OO and C++ concepts. Because I *KNOW*
that the guy who's fluent in assembly will have no problem learning any
procedural or OO language that I throw at him. I do not know that the
other candidate will be able to write decent code in any language.

==============================================================================
TOPIC: Why am I so stupid?
http://groups.google.com/group/comp.lang.c++/t/9c35ffbaed42a937?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 10:26 pm
From: none


James Kanze wrote:

> The answer to your problem, of course, is to use istream for all
> of your parsing. After extracting the float, continue
> extracting using the same istream (istringstream, etc.).

Ok, you (and others) have sold me on the concept of using the istringstream
for parsing, instead of working directly with the string.

But istringstream makes the assumption that everything is separated by
whitespace, at least in the case of the >> operator.

A typical lexer/parser only knows about "tokens." So I might have this
list of tokens:

"(", ")", "+", "-", "*", "/", "sqrt", "sin", "cos", ...

and I might wand to parse an input stream that looks like this:

"(1.2 * -sqrt(7.5e3))"

In other words, I can't rely on tokens to be separated by whitespace. I
need to "peek" before I actually extract, and I might need to peek at more
than one character -- for example, to match the "sqrt" token.

I understand the theory of parsing an input sequence using a grammar, and I
have one that works beautifully in C using a recursive-descent approach.
I'd like to bring it up to date by using an istringstream, or whatever STL
construct is appropriate. I'm finding the low-level nuts and bolts, like
tokenization, very difficult.

==============================================================================
TOPIC: Erase map item via a const_iterator
http://groups.google.com/group/comp.lang.c++/t/9e8b3cac7f8c6976?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 11:02 pm
From: Paavo Helde


none <none@none.none> kirjutas:

> Alf P. Steinbach wrote:
>
>> - Alf (if you delete an 'e', and type an 'e' again, is it the same
>> 'e', eh?)
>
> No joke, I have had that exact same thought. It is probably a sign
> that I am completely insane, but I have even followed the train of
> thought further...
>
> If I select/cut/paste an 'e', is it the same 'e'?
>
> If I delete an 'e' and then "undo" the deletion, is it more the same
> 'e' than it would have been if I had typed a new 'e'?
>
> I understand every step that happens from the instant when the metal
> contacts under my 'e' key touch each other to the dispatch of the
> WM_KEYDOWN message to the application. Yet, somehow, I can't convince
> myself that when you delete that 'e' and type a new one, it is the
> same 'e'.
>
> Related question: If I gave you a rock composed of 10^20 atoms, along
> with a list of every atom's exact <x,y,z> position in space, then

Encoding exact position would need infinite precision and thus infinite
amount of memory. Besides, all atoms would have undetermined momenta
then, so most probably the rock would explode before you manage to
destroy it ;-)

> destroyed that rock completely, and then reassembled it to so that
> every atom's new <x,y,z> was the same as it was originally, would it
> be the same rock?

What you need is to save and restore the full quantum wave state of the
rock. This is what is studied in quantum teleportation. One could also
argue that the rock only manages to exist in time and space by the means
of a similar mechanism, by constantly remembering and restoring its
quantum state. The question now becomes whether this rock is the same
rock 10 nanoseconds later?

Paavo


==============================================================================
TOPIC: Can ifstream read file more than 2G?
http://groups.google.com/group/comp.lang.c++/t/82772d1b68681e35?hl=en
==============================================================================

== 1 of 2 ==
Date: Thurs, Jun 4 2009 11:36 pm
From: Water Lin


I am using ifstream to read file. But when I read a file about 2.8G, the
ifstream will return a size like these:
------------------
-1358985216
------------------

Here is my code:
-----------------------
string dir = "C:\\test";
uint64 size;
ifstream infile(dir.c_str(), ios::in | ios::binary | ios::ate);
if ( infile.is_open() )
{

size = infile.tellg();
}
---------------------

Why the size will be a negative?

Anything wrong?

Someone told me that I should use a 64bit edition of ifstream, is it
true?

--
Water Lin
http://blog.waterlin.org


== 2 of 2 ==
Date: Fri, Jun 5 2009 12:07 am
From: "Alf P. Steinbach"


* Water Lin:
> I am using ifstream to read file. But when I read a file about 2.8G, the
> ifstream will return a size like these:
> ------------------
> -1358985216
> ------------------
>
> Here is my code:
> -----------------------
> string dir = "C:\\test";
> uint64 size;
> ifstream infile(dir.c_str(), ios::in | ios::binary | ios::ate);
> if ( infile.is_open() )
> {
>
> size = infile.tellg();
> }
> ---------------------
>
> Why the size will be a negative?

Assuming 'uint64' is an unsigned integer type, it can't be negative.


> Anything wrong?

See above.

'tellg' returns a 'pos_type'. By §27.1.2 'pos_type' is by default a 'streampos'
for iostreams. By §21.1.3.1/2 a 'streampos' satisifies the requirements for a
'POS_T' in §21.1.2. That paragraph explains that the requirements are described
in §27.1.2. And then we're full circle, recursive without a base case.

Amazingly, this is noted in §27.2/2, "This synopsis suggests a circularity
between streampos and char_traits<char>."

So at least, while not particularly useful for this issue, and while the
standard goes the extreme lengths to obscure the issue (three layers of
indirection, at the least), the standard is at least truthful.

I'm guessing wildly that someone who doesn't have my strong aversion to
iostreams, I mean, they're just *expletive deleted*, may contribute some tidbit
like e.g. something stated in the C standard, or original intent, or something.


> Someone told me that I should use a 64bit edition of ifstream, is it
> true?

For files larger than 2^31 bytes that does seem like a good idea, yes.

Or even better, define your own file handling. :-)


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!

==============================================================================
TOPIC: Member function pointers
http://groups.google.com/group/comp.lang.c++/t/6885a3ff6204f78f?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Jun 4 2009 11:41 pm
From: "Christian Meier"


Victor Bazarov wrote:
> Christian Meier wrote:
>> class Base
>> {
>> };
>>
>> class Derived1 : public Base
>> {
>> Derived1* getterFunc() { return this; }
>> };
>>
>> class Derived2 : public Base
>> {
>> Derived2* getterFunc() { return this; }
>> };
>
> So, the hierarchy is not polymorphic...

Ok, I see, that's an important detail I forgot in my sample code.
In our project the base class has some pure virtual functions.


> It's not possible because nobody ever needed it, so the language has been
> defined not to have that conversion.
>
> Generally speaking, it's not impossible to introduce such a conversion
> into the language, but why bother? Your "problem" has another, simpler
> solution. Your hierarchy probably ought to be polymorphic, and then you
> just return 'Base*' and call virtual functions on those, or use
> 'dynamic_cast'...

As I mentioned, I know that my problem would be solved if I changed the
return type to "Base*". And if I were able to change that code so easily
then I would do that.
I just hoped that there is a technical solution which works together with
the problem of not returning pointers to the base class.

Thanks for your answer. As usual, it was helpful!

Greets Chris

==============================================================================
TOPIC: Wholesale cheap coach shoes, cheap lv shoes online
http://groups.google.com/group/comp.lang.c++/t/ba1706135f3c9b29?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jun 5 2009 12:13 am
From: "Welcome to our website www.sellairjordan23.com"


(www.sellairjordan23.com) professionally wholesale sports shoes from
china,main product including:Footwear-sneakers series
(nike,puma,adidas,Jordan 1-24,nike max,nike shox,nike dunk,nike
kobe,nike rift,bapesta,timberland
boot,D&G,dsquqred,LV,prada,icecream,NBA,lacoste shoes,ect).,T-
shirts,jeans,hootdies/clothes series.,Sandal slippers series.,Leather
belt series.,Handbags series.,Purse series.,Sunglasses,the sun hats/
cap series.,etc.In the short several years, the company by the most
preferential price, the first-class quality, the first-class
service,the first-class security transportation, receives the domestic
and foreign customers welcome. Product best-selling Europe and
America,france, Southeast Asia, Russia, South Africa, country and area
and so on.
Welcome u coming to business with us !!!
Our msn:hy_shoes@hotmail.com
Email: hy_shoes@yahoo.com.cn
Our website: www.sellairjordan23.com


We are NIKE shoes,trainers,sneakers factory stores cheap from
China. We sale and wholesale cheap new nike shoes from NEW NIKE
FACTORY STORES as follows:Nike Air Max 90 91 95 97 2003 2004 2005
2006 360 Ltd Tn Plus Tn2 Tn3 Tn4 Tn6. Nike Air Jordan 1-21,Nike Air
Dunk
Rift Nike Total 90 Lebron James Foamposite. Nike Shox Nz R4 R5 VC OZ
LV Rival Bmw Ride, Shox TL TL2 TL3 Classic Monster Turbo. Nike Air
Force 1 Low High Custom Dollar Worldcup, Air Force 1 Clear.
Basketball and Football Shoes,Kobe Harache,APE Bape Star Prada Gucci
Shoes
Timberland Boots High Low Mid Womens Adidas Football Basketball
Shoes,Adidas Gooo Year Running Shoes T MAC Series Reebok Converse
Puma Shoes.
1. Nike Air Max 90 91 95 97 2003 2004 2005 2006 360 Ltd | Nike Air
Max Tn 2 3 4 6 Sneakers Supplier Trainers Wholesale Shop Catalogs
Men's
Women's Shoes Customize.
http://www.sellairjordan23.com/Cheap_Nike_Air_Max_Series_Wholesale/
2.Nike Shox NZ R4 OZ Bmw Elite Monster VC Shox TL 2 3 Ride Rival
Energia R5 LV TL 3 Turbo Classic Shoes dendara Supply Sale Store
Distributor Manufacturer Running Shoes Mens Womens Shoes Wholesaler.
http://www.sellairjordan23.com/Cheap_Nike_Air_Shox_Series_Wholesale/
3.Nike Air Jordan 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 | Air Jordan Retro I II III IV V VI VII VIII IX X XI XII XIII XIV
XV XVI XVII XVIII XIX XX XXI Sneaker Seller Trainer Suppliers
Collection Chaussure Catalog Customized.
http://www.sellairjordan23.com/Cheap_Nike_Air_Jordan_Series_Wholesale/
4.Nike Air Force I 1 2 one's II Two One Low High Mid Custom Dollar
Clear Carving Transparence Shoes Wholesalers Factory Sell Exporter
Offer Manufacture Directory Importer.
http://www.sellairjordan23.com/Cheap_Air_Force_One_1_Shoes_Wholesale/New_Air_Force_One_1/
5.Nike Air Dunk Mid Low High SB Rift Air Zoom Total 90 Foamposite
Basketball Football shoes New Free 5.0 Kobe Harache Lebron James
Sales Buyer Football Basketball Shoes Import Export Men Women Shoes
Offers.
http://www.sellairjordan23.com/Cheap_Nike_Dunk_SB_Shoes_Wholesale/New_Dunk_Shoes/
6.APE Bape Star Prada Bapesta Converse Reebok Puma Shoes | Timberland
Boots High Mid Low Womens Classic Buy Authentic Shoes Discount Stock
Series Cheap Shoes Business Selection louis vuitton.
http://www.sellairjordan23.com/Cheap_Bape_Star_Shoes_Wholesale/New_Bape_Shoes/
7.Adidas Gooo Year Running Shoes 35 Years Anniversary Adidas Football
Shoes T Mac 3.5 4.5 5 6 Series Basketball Shoes Produce Burberry
Talaria Shoes Training Shoes Trade Outlet Flightposite In stock.
http://www.sellairjordan23.com/Cheap_Adidas_Shoes_Wholesale/New_Adidas_Shoes/
8.Our marketing to USA America US United States UK England United
Kingdom IT Italy NT Netherlands China Chinese, Germany DE Greece GR
France FR Spain Portugal Switzerland Switzerland Brazil Chile Peru
Canada Japan Korea Australia Hongkong Canada Mexico. and sell to all
over the world.
9.In the process of fast development, Huiyue Trade Co.,LTD.is
looking forward to cooperation with inner and abroad business
partners. We will work hard to meet the interests of our customers to
boost our advantage. We are sure we will be one of your best ideal
cooperation partners.
10.EUR Size:
Womens Shoes Sizes | 35 35.5 36 37 37.5 38 39 39.5 40, Mens Sizes |
41
41.5 42 42.5 43 43.5 44 45 46.
USA Size:
Women's shoes sizes | 4 5 5.5 6 7 8 8.5, Men's shoes sizes | 8 8.5 9
9.5 10 10.5 11 11.5 12 13 13.5.
U.K Size:
women sizes | 5 5.5 6.5 7 8 8.5 9, man size | 8 8.5 9 9.5 10 10.5 11
12 13.

==============================================================================
TOPIC: Wholesale coach shoes, cheap coach shoes free shipping www.
sellairjordan23.com
http://groups.google.com/group/comp.lang.c++/t/1789f1305285e365?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jun 5 2009 12:16 am
From: "Welcome to our website www.sellairjordan23.com"


www.sellairjordan23.com

china jordans1-23 sneakers wholesale factory, store.
supply jordan 1 shoes, jordan 2 shoes, jordan 3 shoes, jordan 4 shoes,
jordan 5 shoes, jordan 6 shoes, jordan 7 shoes, jordan 8 shoes, jordan
9 shoes, jordan 10 shoes, jordan 11 shoes, jordan 12 shoes, jordan 13
shoes, jordan 14 shoes, jordan 15 shoes, jordan 16 shoes, jorda n 17
shoes, jordan 18 shoes, jordan 19 shoes, jordan 20 shoes, jordan 21
shoes, jordan 22 shoes, jordan 23 shoes.
also wholesale Jordan3.5 shoes, jordan 4.5 shoes, jordan 7.5 shoes,
jordan 15.5 shoes, jordan 21.5 shoes,
kid jordans sneakers for cheap.
Dub Zero Jordan shoes,
US Size 14 Jordans,
US Size 15 Jordans,
Women\'s Jordan Shoes,
Jordan O\'L School Shoes,
Jordan X Mix Jordan XII Shoes,
Jordan V Mix Jordan III Shoes,
Jordan Six Rings Shoes,
Customs Jordan Sneakers For Sale,
Children\'s Jordan Sneakers,
2008 New Jordan 7 8 9 20 Fusion Air Force Ones Shoes,
http://www.sellairjordan23.com/Cheap_Nike_Air_Jordan_Series_Wholesale/
http://www.sellairjordan23.com/Cheap_Air_Jordan_Force_One_1_Fusion_Wholesale/

Discount Pirce:

Jordan I Shoes, Jordan II Shoes, Jordan III Shoes, Jordan IV Shoes,
Jordan V Shoes, Jordan VI Shoes, Jordan VII Shoes, Jordan VIII Shoes,
Jordan IX Shoes, Jordan X Shoes, Jordan XI Shoes, Jordan XII Shoes,
Jordan XIII Shoes, Jordan XIV Shoes, Jordan XV Shoes, Jordan XVII
Shoes, Jordan XXI Sneakers, Jordan XXII Shoes, Jordan XXIII
Sneakers...

For More AAA Quality Products Please Vist:

http://www.sellairjordan23.com

E-mail: hy_shoes@yahoo.com.cn
Msn: hy_shoes@hotmail.com

==============================================================================
TOPIC: Christian Audigier(CA) hoodies,wholesale CA t-shirts,CA shoes,Christian
Audigier hats ( www.topsellingnow.com )
http://groups.google.com/group/comp.lang.c++/t/3037221167109745?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jun 5 2009 12:17 am
From: "www.topsellingnow.com"


affliction t-shirt,Affliction jeans,cheap affliction
hoodies,affliction ( www.topsellingnow.com )

D&G,Armani,Boss,Versace,Prada,G-star Mens Fashion T-shirts
( www.topsellingnow.com )

smet t-shirt,Affliction jeans,affliction hoodies,Blac Label men's
Tshirts ( www.topsellingnow.com )

cheap bape clothes,bape hoodies,bape t-shirts,bape hats
( www.topsellingnow.com )

BBC(Billionaire Boys Club) hoodies,BBC jacket,cheap bbc jeans
( www.topsellingnow.com )

ed hardy hoodies,ed hardy jeans,ed hardy t-shirts,Ed Hardy hats,ED
Hardy skirts ( www.topsellingnow.com )

ed hardy shorts jeans with cheap price ( www.topsellingnow.com )

AFFLICTION T-SHIRTS,( www.topsellingnow.com ) AFFLICTION JEANS

COOGI T-SHIRTS,( www.topsellingnow.com ),COOGI JEANS,COOGI HOODIES


Christian Audigier(CA) hoodies,wholesale CA t-shirts,CA
shoes,Christian Audigier hats ( www.topsellingnow.com )

Coogi t-shirt,Coogi jeans,Coogi hoodies,Coogi women' t-shirts,,cheap
price ( www.topsellingnow.com )

Armani T-shirts,A&F women' t-shirts,affliction t-shirts affliction
jeans from china ( www.topsellingnow.com )

Abercrombie&Fitch t-shirts,cheap AF t-shirts from china
( www.topsellingnow.com )

AFFLICTION T-SHIRTS,( www.topsellingnow.com ) AFFLICTION JEANS

COOGI T-SHIRTS,( www.topsellingnow.com ),COOGI JEANS,COOGI HOODIES

==============================================================================
TOPIC: cheap Air Jordan 5 x Air Force one Fusion (www.topsellingnow.com)
discount Air Jordan 4 x Air Force one Fusion
http://groups.google.com/group/comp.lang.c++/t/b0dadb3bbdc00c1a?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jun 5 2009 12:18 am
From: "www.topsellingnow.com"


cheap jordans and air force ones site at www.topsellingnow.com
wholesale Air Jordan 12 Fusion,air jordan 5x air force 1 Fusion
(www.topsellingnow.com)
(www.topsellingnow.com) Wholesale New Air Jordan 12 Fusion,Air Jordan
12 X Air Force 1. Wholesale New Air Jordan 12 Fusion,Air Jordan 12 X
Air Force 1
cheap Air Jordan 5 x Air Force one Fusion (www.topsellingnow.com)
discount Air Jordan 5 and Air Force one Fusion(www.topsellingnow.com)
Air Jordan 12 x Air Force One china online store
(www.topsellingnow.com)
(www.topsellingnow.com)Air Jordan V x Air Force 1 Fusion
Air Jordan 12 x Air Force Ones Fusion (www.topsellingnow.com)
(www.topsellingnow.com) Nike AF1 x Air Jordan 5. Nike Air Force Ones
Shoes & Air Jordan 5.
wholesale Air Jordan 5 (V) x Air Force 1 Fusion
(www.topsellingnow.com)
discount Air Jordan 4 x Air Force one Fusion (www.topsellingnow.com)
wholesale Air Jordan 23 x Air Force 1 Fusion (www.topsellingnow.com)

Website: http://www.topsellingnow.com
E-mail: topsellingnow@yahoo.com.cn
Msn: topsellingnow@hotmail.com

==============================================================================
TOPIC: Wholesale cheap Gucci D&G prada lv Hogan chanel coach dior burberry
timberland
http://groups.google.com/group/comp.lang.c++/t/e0fbca744c87d330?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jun 5 2009 12:18 am
From: "Welcome to our website www.sellairjordan23.com"


Please refer to www.sellairjordan23.com to get more picture and
information.
wholesale a wide range of name brand apparels, handbags, designer
purses
& wallets, sun glasses and shoes replicas. We offer varies of brands
as
followed: Abercrombie&fitch, Armani, Artful Dodger, Baby phat,
Bathing
Ape, BBC, Burberry, Calvin Klein, Christian audigier, D&G, Diesel,
Dsquared2, Ed-hardy, Energie, Evisu, Frankie B, G-star, Hollister,
Juicy
winter collection, Just cavalli, Kidrobot, Lacoste,Levis, Miss Sixty,
Prada, Primp, Ralph Lauren Polo, Rich Yung, RMC, Rock & Republic,
Seven,True Religion, Versace, Gucci, Chanel, Coach, LV, ,Dior, Chole,
Fendi ,Juicy Couture,Versace,Timberland, Air Jordan,
Adidas,Nike,Dsquared2,Puma,Converse,Mauri,Prada.

If you need more detailed information, please dont hesitate to
contact us.
msn: hy_shoes@hotmail.com
email: hy_shoes@yahoo.com.cn
We will provide you the best service and the best quality products.
wholesale shox,air max,air force,jordan shoes
supply shox,air max,air force,jordan shoes

wholesale polo ralph lauren,lacoste,abercrombie
wholesale abercrombie polo,tshirts,hoody,pants,jacket,fleece
abercrombie fleece,jacket,coat,hoody
ed hardy,christian audigier,bape,bbc,abercombie hoody
gucci,prada,dsquared,dg,hogan,lv,versace shoes
true religion,rock republic,seven,versace
juicy couture,baby phat,true religion,rock republic
abercrombie,ralph lauren,lacoste,burberry,juicy couture,
http://www.sellairjordan23.com/Cheap_Hoody_Wholesale/
http://www.sellairjordan23.com/Cheap_T-Shirt_Wholesale/
http://www.sellairjordan23.com/Cheap_Jacket_Wholesale/

wholesale gucci,prada,louis vuitton,versace bags
supply gucci,prada,versace,lv,fendi handbags
versace,dg,fendi,coach,louis vuitton,gucci bags
http://www.sellairjordan23.com/Cheap_Bag_Wholesale/

Nike, sport shoes, DMP ,air jordan 1, 2,
3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,4.5, dub zero,
Max
90,95,97,2003,2004,2005,2006,ltd,TN, Force,Shox nz, BMW,
TL,tl2,tl3,tl4,tl5, oz, turbo, monster,
r3,r4,r5,Sneakers,Trainers,Kicks,Adidas, Puma,Bape
Star,Dunk,Kobe,Rift,James
Lebron,Basketball,Soccer,Tennis,Authentic,
Replica,Retro,clear,Bape Star, Dunk, Kobe, Rift, Basketball,
Soccer,
football,

Sweaters,D&G,Evisu,Lacoste,Red monkey, Seven, Bape star, Rock
Republic,Dior,Coogi, Ralph Lauren polo, Armani, True
Religion, Jackets, Coats, Socks, Bikini, under pants, Apparel,
Juicy, Diesel, Fashion

Watches, Purses, Wallets, Hats, Caps, Sun Glasses, Rolex, Gucci,
Prada, Fashion, LV, Casual, Leisure. Reebok, Converse
T shirt, tshirt, Jeans, Jersy, shorts, Track suits, Sweaters, D&G,
Evisu,
Lacoste,Red monkey, Seven, And1 ,Dior, Coogi, Ralph Lauren, polo,
Armani ,
True Religion, Jackets, Coats, Socks ,Bikini, underwear, pants,
Apparel,
Lee,Juicy, Diesel, Purses, Wallets, Hats, Caps,
Sunglasses,Rolex,Gucci,Louis
Vuitton,Casual, Leisure,LV handbag Energie,Anti,,NFL,NBA jersey,
Citizens of Humanity, Frankie B Jeans, Girbaud ,G-Star, Miss
Sixty, So jeans,A&F items,Abercrombie fitch,Christian Dior, Ck
shorts,
Columbia, Canada goose,Ed Hardy,Evisu,Red
Monkey,Chanel,,OK,Prada,Hogan,Christian
Audigier, Hudson jeans, Lrg jackets ,jeans ,levis jeans, Motocycle
clothing ,North
Face,Versace,
http://www.sellairjordan23.com/Cheap_Jerseys_Wholesale/
Burberry,Giorgio
, Rich Young, True religion, Air Zoom,ferragamo puma,
4us
shoes,7 for all mankind roca wear ,track suit ,sean john
suits ,sean john jackets,
lrg jackets,suits, lrg jeans,quicksilver,roxy,armani ,quick
jeans ,armani long sleeves,
burberry tshirts, Calvin Klein underwear, juicy swimwear, suits,
juicy,Ice cream


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

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: