http://groups.google.com/group/comp.lang.c++?hl=en
comp.lang.c++@googlegroups.com
Today's topics:
* want to learn stl - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/t/46c65272546dd209?hl=en
* Virtual construtors - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/aea7843ff0dd519f?hl=en
* Type of elements of std::string - 3 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/b6aba4785e69df38?hl=en
* ๑۩๑۩๑all kinds of brand shoes, t-shirt , handbags for sale by paypal - 2
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/835b16c623e62720?hl=en
* Support for export keyword ? - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/0878ed0c9c1ca584?hl=en
* ===Welcome to comp.lang.c++! Read this first. - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/8359863cfafcc5aa?hl=en
* Paypal payment Discount Armani Jeans True Religion Jeans Levi s Jeans LRG
Jeans G-STAR Jeans (www.dotradenow.com) - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/b9b8ded1ce4ec669?hl=en
* std::not1() doesn't accept a function pointer - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/940b7aa3b05d8e70?hl=en
* Can Someone please help me with my Computer stuff? 54463 - 1 messages, 1
author
http://groups.google.com/group/comp.lang.c++/t/0d22de06aa593ed0?hl=en
* writing binary files - 3 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/3acbfe82ba5d0012?hl=en
* How to copy vector? - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/4adcee4457a06858?hl=en
* Object (de)serialization - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/9fc67e8f28fe4918?hl=en
* complex struct - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/59f0b47ab3f08848?hl=en
* generate rand number - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/fcb11e63c73e0db8?hl=en
==============================================================================
TOPIC: want to learn stl
http://groups.google.com/group/comp.lang.c++/t/46c65272546dd209?hl=en
==============================================================================
== 1 of 3 ==
Date: Wed, Jan 27 2010 7:00 am
From: "**Group User**"
On Jan 27, 8:32 pm, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
> vicky wrote:
> Or you can simply get
> a course in your local college or get a book ("The C++ Standard Library"
> by Josuttis is excellent) and study.
>
> V
> --
> Please remove capital 'A's when replying by e-mail
> I do not respond to top-posted replies, please don't ask
Yes I definitely agree, it is Joshhh - the man of STL
I find books by Deitel are good for beginners too, they are used as
textbooks are on library shelves in quite a lot of colleges
== 2 of 3 ==
Date: Wed, Jan 27 2010 7:42 am
From: "osmium"
vicky wrote:
> i want to learn stl, if anybody can guide
That's a formidable task. Fortunately there is a superb book on the
subject, _The C++ Standard Library_ by Nicolai Josutis. If you think
"formidable" is an exaggeration, the book has 800 pages and I don't think
there is any fat there. I found it useful to create a personalized partial
index for the book in a home brew text file on my computer.
You will have to learn to love verylonganddescriptivetypenames. Or at least
learn to copy them faithfully.
== 3 of 3 ==
Date: Wed, Jan 27 2010 1:54 pm
From: Immortal Nephi
On Jan 27, 9:42 am, "osmium" <r124c4u...@comcast.net> wrote:
> vicky wrote:
> > i want to learn stl, if anybody can guide
>
> That's a formidable task. Fortunately there is a superb book on the
> subject, _The C++ Standard Library_ by Nicolai Josutis. If you think
> "formidable" is an exaggeration, the book has 800 pages and I don't think
> there is any fat there. I found it useful to create a personalized partial
> index for the book in a home brew text file on my computer.
>
> You will have to learn to love verylonganddescriptivetypenames. Or at least
> learn to copy them faithfully.
You can **reinvent** your wheel again. Learn how to write your own
vector class in your code writing yourself. Study it. Then don't
reinvent wheel anymore. Use STL.
Read a book. The book is excellent. The title name is Objects,
Abstraction, Data Structures and Design using C++. Arthor's name
Elliot B. Koffman and Paul A.T. Wolfgang. ISBN 0-471-46755-3.
==============================================================================
TOPIC: Virtual construtors
http://groups.google.com/group/comp.lang.c++/t/aea7843ff0dd519f?hl=en
==============================================================================
== 1 of 2 ==
Date: Wed, Jan 27 2010 7:57 am
From: Tony D
On Jan 27, 10:08 pm, Mukesh <mukeshs...@gmail.com> wrote:
> I am agree that there is no sense using virtual construstor.
> What about if we have default construtor and then virtual copy
> constructor ?
Neat idea, and - as far as I can see - possible too. Still, it would
require some significant changes, as C++ currently mandates a distinct
memory allocation step independent of object construction. For your
idea to work, the heap memory allocation itself would need to access
the copy-constructor's argument's RTTI to find the possibly-derived
object's actual size. After that, the constructors from base to
derived could be called in succession....
So, possible, but not a good fit with current operator new
overloading, RTTI etc.. Bit of a shame, as obviously people are
interested enough in how to do this that the FAQ has to document clone
()....
Cheers,
Tony
== 2 of 2 ==
Date: Wed, Jan 27 2010 2:31 pm
From: James Kanze
On Jan 27, 1:08 pm, Mukesh <mukeshs...@gmail.com> wrote:
> I am agree that there is no sense using virtual construstor.
> What about if we have default construtor and then virtual copy
> constructor ?
Probably because it's not implementable.
In the end, you can't call the constructor directly; you only
have language constructs which eventually call the constructor.
After having allocated the necessary memory. And to allocate
the necessary memory, the compiler has to know, statically, the
size of the object. Which means that it has to know the type.
In other words, creating an object can't be "virtual".
--
James Kanze
==============================================================================
TOPIC: Type of elements of std::string
http://groups.google.com/group/comp.lang.c++/t/b6aba4785e69df38?hl=en
==============================================================================
== 1 of 3 ==
Date: Wed, Jan 27 2010 8:22 am
From: "Leigh Johnston"
> Unlike fread, however, istream::read does NOT indicate how many
> characters were read, so if (for example) trailing blanks in the
> input were significant, and you really needed to distinguish them
> from the string's initial value, this method probably wouldn't work
> well (unless you could initialize the string to some other value you
> knew wouldn't come from the input).
>
istream::gcount() will tell you how many characters were read by the last
call to istream::read
/Leigh
== 2 of 3 ==
Date: Wed, Jan 27 2010 8:41 am
From: "Leigh Johnston"
> More generally, considering the first algorithm: the
> no-argument form of istream::get returns an int in order to
> return out of band data, e.g. EOF. Once that data has been
> tested for and excluded, the resulting value must be converted
> to a char. Formally, a rather complex operation, since the
> resulting value is in the range 0...UCHAR_MAX, which might not
> fit into a char (and if the results don't fit, the behavior is
> implementation defined, and might result in a signal).
> Practically, implementations which use signed plain char will
> always ensure that this works, given that it is such a standard
> idiom (in C, at least). But if you really want to avoid it,
> something like:
>
Your insistence on describing the behaviour of rare corner case
implementations is unhelpful as it confuses the issue, the fact that char ch
= (unsigned char) foo; is implementation defined behaviour is not
justification for eschewing the use of istream::read(). Please rejoin the
real world.
/Leigh
== 3 of 3 ==
Date: Wed, Jan 27 2010 2:43 pm
From: James Kanze
On Jan 27, 4:41 pm, "Leigh Johnston" <le...@i42.co.uk> wrote:
> > More generally, considering the first algorithm: the
> > no-argument form of istream::get returns an int in order to
> > return out of band data, e.g. EOF. Once that data has been
> > tested for and excluded, the resulting value must be
> > converted to a char. Formally, a rather complex operation,
> > since the resulting value is in the range 0...UCHAR_MAX,
> > which might not fit into a char (and if the results don't
> > fit, the behavior is implementation defined, and might
> > result in a signal). Practically, implementations which use
> > signed plain char will always ensure that this works, given
> > that it is such a standard idiom (in C, at least). But if
> > you really want to avoid it, something like:
> Your insistence on describing the behaviour of rare corner
> case implementations is unhelpful as it confuses the issue,
> the fact that char ch = (unsigned char) foo; is implementation
> defined behaviour is not justification for eschewing the use
> of istream::read().
I never said it was (and I do use istream::read and
istream::write). Still, a competent programmer will want to
understand what he's doing, and what the restrictions and the
trade-offs are.
> Please rejoin the real world.
In the real world, not every machine is a PC.
--
James Kanze
==============================================================================
TOPIC: ๑۩๑۩๑all kinds of brand shoes, t-shirt , handbags for sale by paypal
http://groups.google.com/group/comp.lang.c++/t/835b16c623e62720?hl=en
==============================================================================
== 1 of 2 ==
Date: Wed, Jan 27 2010 8:37 am
From: hero
๑۩๑۩๑all kinds of brand shoes, t-shirt , handbags for sale by paypal
we engaged in wholesale 4us shoes, (www.ecyaya.com)
wholesale A&F Jacket, (www.ecyaya.com)(www.ecyaya.com)
adicolor%20man%20shoes,
wholesale Adidas NBA, Adidas 35TH(M), Adidas Y3, Adidas(M),
(www.ecyaya.com)
wholesale AF1 25TH LOW(M&W), AF1 (W), AF1 Fusions AJ9, AF1 Fusions AJ12
(M), AF1 Fusions AJ, AF T-Shirt Women Short, Affliction Jean,
(www.ecyaya.com)
wholesale AirMAX 1, AirMax 87(M), AirMax 89, AirMax 90&360, AirMax 90
(M), AirMax 91, AirMax 95(M), AirMax 97(M), AirMax 360(M), AirMax 2003
(M), AirMax 2009(M), AirMax (95&360), AirMax LTD(M), AirMax TN1(M),
AirMax TN10, AJ2 4 5 6 Fusions(M), AirMax TN10, (www.ecyaya.com)
wholesale AJ3 4 5 6 Fusions(W), AJ3 5 15 Fusions, AJ10 Fusions AJ12,
AJ11 Fusions AJ23, (www.ecyaya.com)
wholesale Amauri Shoes, Armani Belt, (www.ecyaya.com)
wholesale Bape 1HT, BAPE Jean , Bape Colourful, Bape Shoes,
(www.ecyaya.com)
wholesale BBC Jean Man, (www.ecyaya.com)
wholesale Bikkembergs Shoes, (www.ecyaya.com)
wholesale BOSS Belt, (www.ecyaya.com)
wholesale Bureiy Swimming, (www.ecyaya.com)
wholesale Jordan, Nike shox, Nike NZ, (www.ecyaya.com)
wholesale Chanel Belt, Chanel Boots, Chanel Handbags, Chanel Sandal,
Chanel Shoes Women, Chanel Swimming, Chloe Handbags,(www.ecyaya.com)
wholesale Coach Handbag, COACH Sandal,COACH Shoes Man, COACH Shoes
Women, (www.ecyaya.com)
COOGI Jean Man, CROWN HOLDER Jean Man,(www.ecyaya.com)
wholesale D&B Handbag, D&G Belt, D&G Handbags,D&G Jean Man, D&G Shoes
Man Low, D&G Watch, DG T-Shirt Short, (www.ecyaya.com)
wholesale DIESEL Jean Man, Dior Goggle, ECKO T-Shirt, ED Hardy
Handbags, ED HARDY Jean Man, ED Hardy Swimming, ED Hardy T-Shirt Man
Short, (www.ecyaya.com)
wholesale Evisu Jean Man, Fendi Handbag, (www.ecyaya.com)
G-STAR Jean Man, G-STAR T-Shirt Short, (www.ecyaya.com)
wholesale Gucci Goggle, Gucci Handbags, GUCCI Sandal, GUCCI Jean Man,
GUCCI Shoes Man Low, Gucci Swimming, Jordan 1(M), Jordan 3.5, Jordan
4, Jordan 5, Jordan 7, Jordan 8, Jordan 11, Jordan 9, wholesale Jordan
13, Jordan 21, Jordan 24, Jordan DMP, Jordan Six Rings, Jordan Ture,
(www.ecyaya.com)
wholesale Juicy Handbag, (www.ecyaya.com)
wholesale JUST cavalli Jean Man, (www.ecyaya.com)
wholesale Lacoste T-Shirt Man Short, (www.ecyaya.com)
wholesale LEVIS Jean Man, LV Belt, LV Goggle, LV Handbags, LV
Swimming, (www.ecyaya.com)
wholesale M+4 Jean Man, Miu Miu, (www.ecyaya.com)
wholesale Nike RIFT(M), Okley Goggle, (www.ecyaya.com)
wholesale POLO T-Shirt Man Short, (www.ecyaya.com)
wholesale Prada Handbags, PRADA Jean Man, Prada Shoes Man Low, Prada
Watch, (www.ecyaya.com)
wholesale Puma Man Shoes, RMC Jean Man, ROCK Jean Man,
(www.ecyaya.com)
wholesale Shox NZ(M), Shox R2 Man, Shox R3(M), Shox R4(M), Shox R5,
Shox TL3(M), Shox Turob, (www.ecyaya.com)
wholesale Touse Swimming, TR Jean Man, TRUE RELIG Jean Man,
(www.ecyaya.com)
wholesale UGG 30ht 5728, UGG 5825 AAA, UGG Boot 5818, Versace Goggle,
VERSACE Jean Man etc.(www.ecyaya.com)
== 2 of 2 ==
Date: Wed, Jan 27 2010 8:37 am
From: hero
๑۩๑۩๑all kinds of brand shoes, t-shirt , handbags for sale by paypal
we engaged in wholesale 4us shoes, (www.ecyaya.com)
wholesale A&F Jacket, (www.ecyaya.com)(www.ecyaya.com)
adicolor%20man%20shoes,
wholesale Adidas NBA, Adidas 35TH(M), Adidas Y3, Adidas(M),
(www.ecyaya.com)
wholesale AF1 25TH LOW(M&W), AF1 (W), AF1 Fusions AJ9, AF1 Fusions AJ12
(M), AF1 Fusions AJ, AF T-Shirt Women Short, Affliction Jean,
(www.ecyaya.com)
wholesale AirMAX 1, AirMax 87(M), AirMax 89, AirMax 90&360, AirMax 90
(M), AirMax 91, AirMax 95(M), AirMax 97(M), AirMax 360(M), AirMax 2003
(M), AirMax 2009(M), AirMax (95&360), AirMax LTD(M), AirMax TN1(M),
AirMax TN10, AJ2 4 5 6 Fusions(M), AirMax TN10, (www.ecyaya.com)
wholesale AJ3 4 5 6 Fusions(W), AJ3 5 15 Fusions, AJ10 Fusions AJ12,
AJ11 Fusions AJ23, (www.ecyaya.com)
wholesale Amauri Shoes, Armani Belt, (www.ecyaya.com)
wholesale Bape 1HT, BAPE Jean , Bape Colourful, Bape Shoes,
(www.ecyaya.com)
wholesale BBC Jean Man, (www.ecyaya.com)
wholesale Bikkembergs Shoes, (www.ecyaya.com)
wholesale BOSS Belt, (www.ecyaya.com)
wholesale Bureiy Swimming, (www.ecyaya.com)
wholesale Jordan, Nike shox, Nike NZ, (www.ecyaya.com)
wholesale Chanel Belt, Chanel Boots, Chanel Handbags, Chanel Sandal,
Chanel Shoes Women, Chanel Swimming, Chloe Handbags,(www.ecyaya.com)
wholesale Coach Handbag, COACH Sandal,COACH Shoes Man, COACH Shoes
Women, (www.ecyaya.com)
COOGI Jean Man, CROWN HOLDER Jean Man,(www.ecyaya.com)
wholesale D&B Handbag, D&G Belt, D&G Handbags,D&G Jean Man, D&G Shoes
Man Low, D&G Watch, DG T-Shirt Short, (www.ecyaya.com)
wholesale DIESEL Jean Man, Dior Goggle, ECKO T-Shirt, ED Hardy
Handbags, ED HARDY Jean Man, ED Hardy Swimming, ED Hardy T-Shirt Man
Short, (www.ecyaya.com)
wholesale Evisu Jean Man, Fendi Handbag, (www.ecyaya.com)
G-STAR Jean Man, G-STAR T-Shirt Short, (www.ecyaya.com)
wholesale Gucci Goggle, Gucci Handbags, GUCCI Sandal, GUCCI Jean Man,
GUCCI Shoes Man Low, Gucci Swimming, Jordan 1(M), Jordan 3.5, Jordan
4, Jordan 5, Jordan 7, Jordan 8, Jordan 11, Jordan 9, wholesale Jordan
13, Jordan 21, Jordan 24, Jordan DMP, Jordan Six Rings, Jordan Ture,
(www.ecyaya.com)
wholesale Juicy Handbag, (www.ecyaya.com)
wholesale JUST cavalli Jean Man, (www.ecyaya.com)
wholesale Lacoste T-Shirt Man Short, (www.ecyaya.com)
wholesale LEVIS Jean Man, LV Belt, LV Goggle, LV Handbags, LV
Swimming, (www.ecyaya.com)
wholesale M+4 Jean Man, Miu Miu, (www.ecyaya.com)
wholesale Nike RIFT(M), Okley Goggle, (www.ecyaya.com)
wholesale POLO T-Shirt Man Short, (www.ecyaya.com)
wholesale Prada Handbags, PRADA Jean Man, Prada Shoes Man Low, Prada
Watch, (www.ecyaya.com)
wholesale Puma Man Shoes, RMC Jean Man, ROCK Jean Man,
(www.ecyaya.com)
wholesale Shox NZ(M), Shox R2 Man, Shox R3(M), Shox R4(M), Shox R5,
Shox TL3(M), Shox Turob, (www.ecyaya.com)
wholesale Touse Swimming, TR Jean Man, TRUE RELIG Jean Man,
(www.ecyaya.com)
wholesale UGG 30ht 5728, UGG 5825 AAA, UGG Boot 5818, Versace Goggle,
VERSACE Jean Man etc.(www.ecyaya.com)
==============================================================================
TOPIC: Support for export keyword ?
http://groups.google.com/group/comp.lang.c++/t/0878ed0c9c1ca584?hl=en
==============================================================================
== 1 of 2 ==
Date: Wed, Jan 27 2010 9:16 am
From: Anand Hariharan
On Jan 21, 2:38 pm, James Kanze <james.ka...@gmail.com> wrote:
(...)
>
> Also, of course, the semantics of an exported template aren't
> the same as those of a template which isn't exported. Many
> cases of undefined behavior with todays templates are well
> defined if the template is exported.
>
Could you give an example, please?
thank you,
- Anand Hariharan
== 2 of 2 ==
Date: Wed, Jan 27 2010 2:36 pm
From: James Kanze
On Jan 27, 5:16 pm, Anand Hariharan <mailto.anand.hariha...@gmail.com>
wrote:
> On Jan 21, 2:38 pm, James Kanze <james.ka...@gmail.com> wrote:
> (...)
> > Also, of course, the semantics of an exported template aren't
> > the same as those of a template which isn't exported. Many
> > cases of undefined behavior with todays templates are well
> > defined if the template is exported.
> Could you give an example, please?
Just the difference between separate compilation and not
separate compilation. The exported template is defined and
instantiated in a controled environ, and so is not affected by
the source code in which it is used, except for dependent names.
For one obvious example: an exported template can use helper
functions in an unnamed namespace. And will not be affected by
unnamed namespaces which precede the template in the file which
uses it.
--
James Kanze
==============================================================================
TOPIC: ===Welcome to comp.lang.c++! Read this first.
http://groups.google.com/group/comp.lang.c++/t/8359863cfafcc5aa?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Jan 27 2010 9:30 am
From: Shiva
Welcome to comp.lang.c++! Read this first.
This post is intended to give the new reader an introduction to reading
and posting in this newsgroup. We respectfully request that you read
all the way through this post, as it helps make for a more pleasant
and useful group for everyone.
First of all, please keep in mind that comp.lang.c++ is a group for discussion
of general issues of the C++ programming language, as defined by the ANSI/ISO
language standard. If you have a problem that is specific to a particular system
or compiler, you are much more likely to get complete and accurate answers in a
group that specializes in your platform. A listing of some newsgroups is given
at the end of this post.
The FAQ (Frequently Asked Question) list has a wealth of information for
both the new and veteran C++ programmer. No matter what your experience
level, you are encouraged to read the entire list, if only to familiarize
yourself with what answers are available to minimize redundant replies.
The comp.lang.c++ FAQ is available at http://www.parashift.com/c++-faq-lite/
If the FAQ list does not help, then many regular readers of this group
are happy to assist with problems of standard C++. We have only a few
requests that we ask be adhered to, for the benefit of all:
* Please put a short summary in the subject line. Descriptions such as
"HELP!!!!!!" are not helpful, and many regular posters ignore such
requests. A good example is, "Problem with Virtual Functions."
* State the question or the problem clearly and concisely. Describe what
you are trying to do, and the problem you are running into. Include all
relevant error messages.
* Include the smallest, complete and compilable program that exhibits your
problem. As a rule, posters in comp.lang.c++ will not do homework, but will
give helpful hints if you have shown some willingness to try a solution.
* comp.lang.c++ is forum for discussion, and as such some regular posters do
not give E-mail replies. Very often follow-ups to postings have corrections,
so plan on taking part in the discussion if you post a question. If you
do receive e-mail replies, it is considered polite to post a summary.
* Don't post in HTML format. Many readers of this newsgroup don't use
newsreaders which can handle HTML postings.
* If you have to include source code in your post, include the
source in the message body. Don't use attachments. A lot
of contributors to this newsgroup won't even notice the existence
of attachments or won't open them. You try to get any help
you can get, don't you?
Some netiquette topics which frequently crop up on comp.lang.c++ are
also answered in the FAQ.
* Should I post job advertisements and/or resumes on comp.lang.c++?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.10
* What if I really need a job; should I post my resume on comp.lang.c++?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.11
* What should I do to someone who posts something off-topic?
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.12
A note on comp.lang.c++ etiquette: Accuracy is valued very highly in this
newsgroup; therefore posts are frequently corrected, sometimes perhaps
too harshly, and often to the annoyance of new posters who consider the
correction trivial. Do not take it personally; the best way to fit in
with comp.lang.c++ is to express gratitude for the correction, move on,
and be more careful next time.
This is a very busy group, so these requests are designed to make it as
pleasant and efficient an experience as possible. We hope it proves
a valuable commodity to you.
A list of some Newsgroups :
Languages and Programming
-------------------------
comp.lang.c The C Programming Language
comp.lang.asm.x86 x86 assembly language programming
comp.programming Non-language specific programming
comp.graphics.algorithms Issues of computer graphics
Operating Systems
-----------------
comp.os.msdos.programmer DOS, BIOS, Memory Models, interrupts,
screen handling, hardware
comp.os.ms-windows.programmer.win32 MS/Windows: Mice, DLLs, hardware
comp.os.os2.programmer.misc OS/2 Programming
comp.sys.mac.programmer.misc Macintosh Programming
comp.unix.programmer General Unix: processes, pipes, POSIX,
curses, sockets
comp.unix.[vendor] Various Unix vendors
Microsoft VC++
-------------
microsoft.public.vc.language VC++ issues
microsoft.public.vc.mfc MFC Issues
microsoft.public.dotnet.languages.vc C++/CLR Issues
microsoft.public.dotnet.framework .Net Framework
Borland C++ Builder
-------------------
borland.public.cppbuilder.language Borland C++ Builder
borland.public.cpp.language
borland.public.cppbuilder
-Shiva
http://www.slack.net/~shiva/welcome.txt
Wed Jan 27 12:30:00 EST 2010
==============================================================================
TOPIC: Paypal payment Discount Armani Jeans True Religion Jeans Levi s Jeans
LRG Jeans G-STAR Jeans (www.dotradenow.com)
http://groups.google.com/group/comp.lang.c++/t/b9b8ded1ce4ec669?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Jan 27 2010 9:46 am
From: wendy
Discount Wholesale Affliction Jeans <free shipping paypal payment>
Discount Wholesale AK Jeans ( www.dotradenow.com )
Discount Wholesale Armani Jeans
Discount Wholesale Artful Dodger Jeans <free shipping paypal payment>
Discount Wholesale BAPE Jeans
Discount Wholesale BBC Jeans ( www.dotradenow.com )
Discount Wholesale Black Label Jeans
Discount Wholesale Cavalli Jeans
Discount Wholesale Christian Audigier Jeans
Discount Wholesale Coogi Jeans
Discount Wholesale Crown Holder Jeans ( www.dotradenow.com )
Discount Wholesale D&G Jeans
Discount Wholesale Diesel Jeans
Discount Wholesale ECKO Jeans ( www.dotradenow.com )
Discount Wholesale ED Hardy Jeans
Discount Wholesale Evisu Jeans
Discount Wholesale G-STAR Jeans <free shipping paypal payment>
Discount Wholesale GUCCI Jeans
Discount Wholesale Iceberg Jeans
Discount Wholesale Kanji Jeans ( www.dotradenow.com )
Discount Wholesale Laguna Beach Jeans
Discount Wholesale Levi s Jeans
Discount Wholesale LRG Jeans <free shipping paypal payment>
Discount Wholesale LV Jeans
Discount Wholesale Prada Jeans ( www.dotradenow.com )
Discount Wholesale RMC Jeans
Discount Wholesale Roca Wear Jeans <free shipping paypal payment>
Discount Wholesale Rock&Republic Jeans
Discount Wholesale True Religion Jeans <free shipping paypal payment>
Discount Wholesale Versace Jeans
Discount Wholesale ZEN Jeans ( www.dotradenow.com )
Belt
Discount Wholesale Armani Belt <free shipping paypal payment>
Discount Wholesale Bape Belt
Discount Wholesale BOSS Belt (www.dotradenow.com)
Discount Wholesale Burberry Belt
Discount Wholesale CA Belt
Discount Wholesale Chanel Belt <free shipping paypal payment>
Discount Wholesale CK Belt
Discount Wholesale D&G Belt <free shipping paypal payment>
Discount Wholesale Diesel Belt
Discount Wholesale Dior Belt ( www.dotradenow.com )
Discount Wholesale DSQ Belt
Discount Wholesale ED Belt ( www.dotradenow.com )
Discount Wholesale Fendi Belt <free shipping paypal payment>
Discount Wholesale Gucci Belt
Discount Wholesale Hermes Belt ( www.dotradenow.com )
Discount Wholesale Levi s Belt
Discount Wholesale LV Belt <free shipping paypal payment>
Discount Wholesale POLO Belt ( www.dotradenow.com )
Discount Wholesale Prada Belt
Discount Wholesale Versace Belt <free shipping paypal payment>
Pants
Discount Wholesale A&F Pants <free shipping paypal payment>
Discount Wholesale Affliction Pants ( www.dotradenow.com )
Discount Wholesale Bape Pants
Discount Wholesale Christian Audigier Pants ( www.dotradenow.com )
Discount Wholesale COOGI Pants <free shipping paypal payment>
Discount Wholesale Crown Holder Pants
Discount Wholesale ED Hardy Pants ( www.dotradenow.com )
Discount Wholesale Evisu Pants <free shipping paypal payment>
Discount Wholesale Discount Wholesale RMC Pants
Rock&Republic Pants ( www.dotradenow.com )
==============================================================================
TOPIC: std::not1() doesn't accept a function pointer
http://groups.google.com/group/comp.lang.c++/t/940b7aa3b05d8e70?hl=en
==============================================================================
== 1 of 2 ==
Date: Wed, Jan 27 2010 9:52 am
From: Juha Nieminen
Pete Becker <pete@versatilecoding.com> wrote:
> Because it has to return an object whose type has a couple of nested
> typedefs, and their definitions are propagated from the type that you
> instantiate it with. A pointer to function doesn't have those typedefs,
> so can't be used here. The same problem arises with not2, bind1st and
> bind2nd. The solution is to wrap the function pointer in a type that
> provides those typedefs, using ptr_fun.
Why cannot std::not1() do this itself? Why do you have to do it
manually?
== 2 of 2 ==
Date: Wed, Jan 27 2010 11:26 am
From: Pete Becker
Juha Nieminen wrote:
> Pete Becker <pete@versatilecoding.com> wrote:
>> Because it has to return an object whose type has a couple of nested
>> typedefs, and their definitions are propagated from the type that you
>> instantiate it with. A pointer to function doesn't have those typedefs,
>> so can't be used here. The same problem arises with not2, bind1st and
>> bind2nd. The solution is to wrap the function pointer in a type that
>> provides those typedefs, using ptr_fun.
>
> Why cannot std::not1() do this itself? Why do you have to do it
> manually?
It wasn't designed to. ptr_fun was the approach in the original STL.
--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of
"The Standard C++ Library Extensions: a Tutorial and Reference"
(www.petebecker.com/tr1book)
==============================================================================
TOPIC: Can Someone please help me with my Computer stuff? 54463
http://groups.google.com/group/comp.lang.c++/t/0d22de06aa593ed0?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Jan 27 2010 12:54 pm
From: Andy Champ
Virgina Hernandez wrote:
> I use the computer and the Net on a regular basis but I don't know a whole lot about it all, especially when it gets technical. I have an Acer Aspire AM5100-U5300A. I would like to speed this computer up, I would like a very good grasphics card without spending a fortune. Once I find out what I need I willo just go to ebay but I don't know what kind of meory, cards and such are compaitble with my machine. Help please.
>
> Virgina
> ghtpl@yahoo.com
> http://ipods-imacs.com
>
> wJ/YasC@c?&<U>NLHw++u>Yx<
You have posted your request in a newsgroup specifically aimed at the
computer language C++. There are probably people here who could advise
you - but that is not what this group is for.
The type of computer you need is dependent entirely on what you are
going to use it for. I would suggest you go and talk to someone nearby
- a school or college would be a good place.
Finally I'd avoid eBay. If you get something which is faulty you are
not going to have the experience to understand what is wrong, and even
whether or not it's you that is causing the problem.
Good Luck
Andy
==============================================================================
TOPIC: writing binary files
http://groups.google.com/group/comp.lang.c++/t/3acbfe82ba5d0012?hl=en
==============================================================================
== 1 of 3 ==
Date: Wed, Jan 27 2010 1:35 pm
From: Öö Tiib
On Jan 27, 3:37 am, James Kanze <james.ka...@gmail.com> wrote:
> On Jan 26, 5:31 pm, Öö Tiib <oot...@hot.ee> wrote:
>
> > On Jan 26, 6:31 pm, aaragon <alejandro.ara...@gmail.com> wrote:
> > > fout.close();
> > close() is not needed, ofstream destructor does it.
>
> Not really. He's forgotten an important part: you have to check
> the status of the stream after the close.
Yes, unless it is set to throw of course.
> > Better write some supporting information too, what it is and
> > how lot of bytes it contains (it is called TLV
> > tag-length-value). Use memcpy() to copy all such information
> > into char vector and then write it to file all at once.
> > memcpy() takes void* and you must not cast anything into void*
> > that does not do so silently.
>
> memcpy also just copies the bits of the internal representation,
> so it is generally not a good idea either.
Internal representation of most things is outside of C++ standard, but
this does not mean that it is unspecified. It is specified by other
documents. All that matters in practice is to store enough information
so loading side can decide if and how to reorder the bytes (and
sometimes bits) to restore the stored values.
== 2 of 3 ==
Date: Wed, Jan 27 2010 2:40 pm
From: James Kanze
On Jan 27, 9:35 pm, Öö Tiib <oot...@hot.ee> wrote:
> On Jan 27, 3:37 am, James Kanze <james.ka...@gmail.com> wrote:
> > On Jan 26, 5:31 pm, Öö Tiib <oot...@hot.ee> wrote:
> > > On Jan 26, 6:31 pm, aaragon <alejandro.ara...@gmail.com> wrote:
> > > > fout.close();
> > > close() is not needed, ofstream destructor does it.
> > Not really. He's forgotten an important part: you have to
> > check the status of the stream after the close.
> Yes, unless it is set to throw of course.
In which case, counting on the close in the destructor is even
worse, since it may result in an exception in a destructor. In
practice, you always have to reset the exceptions before closing
the stream.
> > > Better write some supporting information too, what it is
> > > and how lot of bytes it contains (it is called TLV
> > > tag-length-value). Use memcpy() to copy all such
> > > information into char vector and then write it to file all
> > > at once. memcpy() takes void* and you must not cast
> > > anything into void* that does not do so silently.
> > memcpy also just copies the bits of the internal
> > representation, so it is generally not a good idea either.
> Internal representation of most things is outside of C++
> standard, but this does not mean that it is unspecified. It is
> specified by other documents. All that matters in practice is
> to store enough information so loading side can decide if and
> how to reorder the bytes (and sometimes bits) to restore the
> stored values.
All that matters is that you document exactly what you've
output, so that people who have to read the data later have a
fighting chance at doing so. But it's still a lot easier for
all concerned to use a portable format, so that upgrading to a
larger machine doesn't mean having to write a special program
just to be able to read the data.
--
James Kanze
== 3 of 3 ==
Date: Wed, Jan 27 2010 4:15 pm
From: Öö Tiib
On Jan 28, 12:40 am, James Kanze <james.ka...@gmail.com> wrote:
> On Jan 27, 9:35 pm, Öö Tiib <oot...@hot.ee> wrote:
>
> > On Jan 27, 3:37 am, James Kanze <james.ka...@gmail.com> wrote:
> > > On Jan 26, 5:31 pm, Öö Tiib <oot...@hot.ee> wrote:
> > > > On Jan 26, 6:31 pm, aaragon <alejandro.ara...@gmail.com> wrote:
> > > > > fout.close();
> > > > close() is not needed, ofstream destructor does it.
> > > Not really. He's forgotten an important part: you have to
> > > check the status of the stream after the close.
> > Yes, unless it is set to throw of course.
>
> In which case, counting on the close in the destructor is even
> worse, since it may result in an exception in a destructor. In
> practice, you always have to reset the exceptions before closing
> the stream.
>
> > > > Better write some supporting information too, what it is
> > > > and how lot of bytes it contains (it is called TLV
> > > > tag-length-value). Use memcpy() to copy all such
> > > > information into char vector and then write it to file all
> > > > at once. memcpy() takes void* and you must not cast
> > > > anything into void* that does not do so silently.
> > > memcpy also just copies the bits of the internal
> > > representation, so it is generally not a good idea either.
> > Internal representation of most things is outside of C++
> > standard, but this does not mean that it is unspecified. It is
> > specified by other documents. All that matters in practice is
> > to store enough information so loading side can decide if and
> > how to reorder the bytes (and sometimes bits) to restore the
> > stored values.
>
> All that matters is that you document exactly what you've
> output, so that people who have to read the data later have a
> fighting chance at doing so. But it's still a lot easier for
> all concerned to use a portable format, so that upgrading to a
> larger machine doesn't mean having to write a special program
> just to be able to read the data.
Classical STL that we discuss here contains nothing to produce
portable formats. That is why i have not used non-enwrapped streams
for several years. Actually it is not that bad with floats, doubles
and various ints. Bigger troublemakers are usually enums, whole POD
structs and most ironically the chars. Since chars are so bad the
problem may arise to construct that fstream with correct file name on
all platforms to support.
==============================================================================
TOPIC: How to copy vector?
http://groups.google.com/group/comp.lang.c++/t/4adcee4457a06858?hl=en
==============================================================================
== 1 of 2 ==
Date: Wed, Jan 27 2010 2:24 pm
From: James Kanze
On Jan 27, 12:58 am, "Alf P. Steinbach" <al...@start.no> wrote:
> * Immortal Nephi:
[...]
> > int main()
> > {
> > vector< int > copyData;
> > copyData.resize( 100 );
> This size specification is not necessary.
> > copyData = foo();
> > return 0;
> And this 'return' isn't necessary either. 'main' returns 0 by
> default. :-)
It's not necessary according to the formal rules of the
language, but it's necessary for readability and
maintainability. (Not to mention the fact that I've never yet
written a real program where return 0 was acceptable. There's
always some sort of possible error.)
> > }
--
James Kanze
== 2 of 2 ==
Date: Wed, Jan 27 2010 3:00 pm
From: "Alf P. Steinbach"
* James Kanze:
> On Jan 27, 12:58 am, "Alf P. Steinbach" <al...@start.no> wrote:
>> * Immortal Nephi:
>
> [...]
>>> int main()
>>> {
>>> vector< int > copyData;
>>> copyData.resize( 100 );
>
>> This size specification is not necessary.
>
>>> copyData = foo();
>
>>> return 0;
>
>> And this 'return' isn't necessary either. 'main' returns 0 by
>> default. :-)
>
> It's not necessary according to the formal rules of the
> language, but it's necessary for readability and
> maintainability. (Not to mention the fact that I've never yet
> written a real program where return 0 was acceptable. There's
> always some sort of possible error.)
He he, your second sentence trashes, trumps and generally stomps on the first
one. When the return is misleading, as it is here, and you do mention that, :-),
how can it help maintainability instead of hindering maintainability?
Cheers,
- Alf
==============================================================================
TOPIC: Object (de)serialization
http://groups.google.com/group/comp.lang.c++/t/9fc67e8f28fe4918?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Jan 27 2010 3:38 pm
From: Brian
On Jan 25, 3:31 pm, Branimir Maksimovic <bm...@hotmail.com> wrote:
> Thomas J. Gritzan wrote:
> > class Triangle : public Shape {
> > public:
> > Triangle() {
> > cerr << "ctor: Triangle\n";
> > }
> > static void registerClass() {
> > registerShape("triangle", &Shape::create<Triangle>);
> > }
> > };
>
> > int main()
> > {
> > Triangle::registerClass();
> > Shape *x = Shape::deserialise("triangle");
>
> > // checks if x has correct type:
> > cerr << typeid(*x).name() << endl;
> > delete x;
> > }
>
> Perfect, I use this method since 1999.
Here's how I'd do it:
class SendCompressedBuffer;
class Counter;
class Shape {
public:
template <typename B>
explicit Shape(B* buf);
// Add virtual d'tor to allow delete through base pointer
virtual ~Shape() {}
virtual inline void
Send(SendCompressedBuffer* buf, bool = false) const;
virtual inline void
CalculateMarshallingSize(Counter&) const;
template <typename B>
static Shape* BuildPolyInstance(B* buf);
virtual void Draw() const =0;
};
class Triangle : public Shape {
public:
template <typename B>
explicit Triangle(B* buf);
virtual inline void
Send(SendCompressedBuffer* buf, bool = false) const;
virtual inline void
CalculateMarshallingSize(Counter&) const;
virtual void Draw();
};
The full output from the C++ Middleware Writer given the
above as input is here --
http://webEbenezer.net/posts/buildpoly.hh
And here's a portion of that output:
uint32_t const Shape_num = 7001;
uint32_t const Triangle_num = 7002;
template <typename B>
inline Shape*
Shape::BuildPolyInstance(B* buf)
{
uint32_t type_num;
buf->Give(type_num);
switch (type_num) {
case Triangle_num:
return new Triangle(buf);
default:
throw failure("Shape::BuildPolyInstance: Unknown type");
}
}
---------------------------------------------------------------
If there were other concrete, derived classes they would
be added to the switch statement. I think this is both
simpler and more complete than what has previously been
outlined -- there are Send/serialization functions and
the Draw method indicates Shape is an abstract class.
The automated generation of the type numbers helps to
conserve bandwidth. I don't recommend sending/receiving
class names as strings in a real application.
Brian Wood
http://webEbenezer.net
(651) 251-9384
==============================================================================
TOPIC: complex struct
http://groups.google.com/group/comp.lang.c++/t/59f0b47ab3f08848?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Jan 27 2010 6:32 pm
From: Yu Han
On 01/27/2010 07:05 PM, Larry wrote:
> "Yannick Tremblay" <ytrembla@nyx.nyx.net> ha scritto nel messaggio
> news:1264584437.317080@irys.nyx.net...
>
>> std::basic_string<unsigned char>
>> std::vector<unsigned char>
>>
>> std::basic_string<char>
>> std::vector<char>
>>
>> or typedef a "byte" type the way you prefer.
>>
>>
>> There is nothing in std::basic_string<> nor in std::string (which is
>> just std::basic_string<char>) that makes it unable to hold binary
>> data.
>>
>> Several people have been trying to recommend you to give up on writing
>> code that is so prone to buffer overflow and memory violations. C++
>> offers you tool to make life for yourself much easier.
>
> I am going to deal with chars form 0x00 to 0xFF mostly.I don't think the
> lastest code I have written (and posted above) is so prone to buffer
> overflow as well as memory violations.
>
I see. You are enjoying your life!
--
Yu Han
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
==============================================================================
TOPIC: generate rand number
http://groups.google.com/group/comp.lang.c++/t/fcb11e63c73e0db8?hl=en
==============================================================================
== 1 of 1 ==
Date: Wed, Jan 27 2010 6:39 pm
From: Bo Schwarzstein
On Jan 27, 9:25 am, James Kanze <james.ka...@gmail.com> wrote:
> On Jan 26, 1:54 pm, "Larry" <dontmewit...@got.it> wrote:
>
> > I need to create a tiny function to generate a random number
> > ranging from: 1000000 to 9999999. Also, the number should be
> > unique even if I call the function 100 times in a second...can
> > it actually be done?
>
> So which is it? Do the numbers have to be unique, or should
> they be random? (One excludes the other -- if they have to be
> unique, then they can't be truely random.)
>
> > All I know for the moment is this: srand(time(0)): rand(); but it is not
> > that great :-(
>
> The quality of the random number generated in the standard
> library is a quality of implementation issue. Some are fairly
> good, but a lot are horrid. It's fairly simple to implement
> your own, and even simpler to use Boost's functions.
>
> --
> James Kanze
Try boost.random or GSL routines.
==============================================================================
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:
Post a Comment