Friday, January 2, 2009

comp.lang.c++ - 25 new messages in 10 topics - digest

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

comp.lang.c++@googlegroups.com

Today's topics:

* Questionable code example in C++ FAQ Lite? - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/db4c3e1f63ad2629?hl=en
* MFC Goldmine site updated - 5 messages, 3 authors
http://groups.google.com/group/comp.lang.c++/t/cd8333fd25b20df2?hl=en
* "#define" vs "const int" - 3 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/6af68a548d4c7cba?hl=en
* Any mechanism to make STL compilation errors more readable? - 2 messages, 2
authors
http://groups.google.com/group/comp.lang.c++/t/98c59eaf6a828671?hl=en
* C++ improvements: my 2008 summary - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/bd9fbd78c03cf774?hl=en
* need more knowledge about the memory! - 3 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/d80a3b0d99aeb22c?hl=en
* What will the compiler react if I initialize a pointer like "Int *pt=6"? - 5
messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/d081633acba5257c?hl=en
* Why do people still use C instead of C++ ? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/83ec35fb1ade5f05?hl=en
* unresolved external symbol - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/442a4e06bd2037f8?hl=en
* a simple question - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/5024236a053d7dcc?hl=en

==============================================================================
TOPIC: Questionable code example in C++ FAQ Lite?
http://groups.google.com/group/comp.lang.c++/t/db4c3e1f63ad2629?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, Jan 2 2009 6:00 pm
From: "jason.cipriani@gmail.com"


On Dec 29 2008, 1:07 am, alfps <alf.p.steinb...@gmail.com> wrote:
> On 28 Des, 11:26, alfps <alf.p.steinb...@gmail.com> wrote:
>
> > I'm sure Marshall will fix things if he's able to.
>
> Marshall writes that he'll add a 'delete' and "please pass on my very
> best to Juha Nieminen".

It's in the latest update:

http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.9

Jason


== 2 of 2 ==
Date: Fri, Jan 2 2009 7:15 pm
From: enter@exit.here (Labyrinth)


In article <c939fa27-2193-4712-a8c6-49fc19579d4b@l39g2000yqn.googlegroups.com>, "jason.cipriani@gmail.com" <jason.cipriani@gmail.com> wrote:
>On Dec 29 2008, 1:07=A0am, alfps <alf.p.steinb...@gmail.com> wrote:
>> On 28 Des, 11:26, alfps <alf.p.steinb...@gmail.com> wrote:
>>
>> > I'm sure Marshall will fix things if he's able to.
>>
>> Marshall writes that he'll add a 'delete' and "please pass on my very
>> best to Juha Nieminen".
>
>It's in the latest update:
>
>http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.9
>
>Jason

Well, as far as "C++ is protecting you from yourself" goes,
I think Java does it much better.


--
Java MFC Goldmine collections contain over 50,000 articles
on Java, C, C++, C#, VC and MFC in over 50 categories.

Tens of thousands of code snippets and examples,
expert opinions and views and tons of relevant links
on each category.

Sites contain only relevant articles on selected topics.
All noise articles were filtered out.

You can find an answer on any issue within minutes,
if not seconds.

JavaGoldmine:
http://javagoldmine.by.ru/index.html

Mirror:
http://tarkus01.by.ru/index.html

MFCGoldmine:
http://mfcgoldmine.by.ru/index.html

Note:

Sites are indexed by Google. To find you exactly the articles
you are looking for, use advanced search and specify site,
e.g. for MFC Goldmine,

Search within a site or domain: mfcgoldmine.by.ru

For Java Goldmine Google searches, use tarkus01.by.ru,
not javagoldmine.by.ru. It has the biggest Google index.

If have problems accessing some article, use the mirror site.

==============================================================================
TOPIC: MFC Goldmine site updated
http://groups.google.com/group/comp.lang.c++/t/cd8333fd25b20df2?hl=en
==============================================================================

== 1 of 5 ==
Date: Fri, Jan 2 2009 6:54 pm
From: enter@exit.here (Labyrinth)


In article <7B833DC6-67FB-4875-B1DB-8D5ED696075B@microsoft.com>, "David Ching" <dc@remove-this.dcsoft.com> wrote:
>"Labyrinth" <enter@exit.here> wrote in message
>news:gjl02l$29b$3@news.albasani.net...
>
>> I bet you are writting the buggiest code there is,
>> so sloppy is your "arguments". Actually, I do not
>> see a SINGLE argument woth of of anything of any value.
>>
>
>Heh, Jonathan is one of the "experts" here whom you should definitely filter
>in on your website.

I am dissapointed.

>-- David

== 2 of 5 ==
Date: Fri, Jan 2 2009 6:58 pm
From: enter@exit.here (Labyrinth)


In article <gjmk0j$b7p$1@news.albasani.net>, enter@exit.here (Labyrinth) wrote:
>In article <7B833DC6-67FB-4875-B1DB-8D5ED696075B@microsoft.com>, "David Ching"
> <dc@remove-this.dcsoft.com> wrote:
>>"Labyrinth" <enter@exit.here> wrote in message
>>news:gjl02l$29b$3@news.albasani.net...
>>
>>> I bet you are writting the buggiest code there is,
>>> so sloppy is your "arguments". Actually, I do not
>>> see a SINGLE argument woth of of anything of any value.
>>>
>>
>>Heh, Jonathan is one of the "experts" here whom you should definitely filter
>>in on your website.
>
>I am dissapointed.
>
>>-- David

He looks like a big boss, but not quite an expert
from what I see.


Java MFC Goldmine collections contain over 50,000 articles
on Java, C, C++, C#, VC and MFC in over 50 categories.

Tens of thousands of code snippets and examples,
expert opinions and views and tons of relevant links
on each category.

Sites contain only relevant articles on selected topics.
All noise articles were filtered out.

You can find an answer on any issue within minutes,
if not seconds.

JavaGoldmine:
http://javagoldmine.by.ru/index.html

Mirror:
http://tarkus01.by.ru/index.html

MFCGoldmine:
http://mfcgoldmine.by.ru/index.html

Note:

Sites are indexed by Google. To find you exactly the articles
you are looking for, use advanced search and specify site,
e.g. for MFC Goldmine,

Search within a site or domain: mfcgoldmine.by.ru

For Java Goldmine Google searches, use tarkus01.by.ru,
not javagoldmine.by.ru. It has the biggest Google index.

If have problems accessing some article, use the mirror site.


== 3 of 5 ==
Date: Fri, Jan 2 2009 7:54 pm
From: "jason.cipriani@gmail.com"


On Jan 2, 9:47 am, "David Ching" <d...@remove-this.dcsoft.com> wrote:
> "Labyrinth" <en...@exit.here> wrote in message
>
> news:gjl02l$29b$3@news.albasani.net...
>
> > I bet you are writting the buggiest code there is,
> > so sloppy is your "arguments". Actually, I do not
> > see a SINGLE argument woth of of anything of any value.
>
> Heh, Jonathan is one of the "experts" here whom you should definitely filter
> in on your website.

It's actually not that great of a site, for a couple of reasons, some
dealing with the site itself, other dealing with the author.

The content on the site is vaguely indexed into general categories but
is otherwise an unsearchable glob of random forum posts and bits of
source code pulled off of MSDN newsgroups and other limited sources.
It provides no advantage over visiting your search engine of choice
and typing the keywords you are looking for. In fact, it does not even
provide an advantage over simply browsing through the newsgroups
themselves, as it provides you only with lists of out-of-context links
and out-of-order posts, with no threading and no organization of any
bits of information you may stumble upon.

The site is simply yet another scraper site plus a bit of AdSense on
the front pages. It's reminiscent of scraper sites like Encyclocentral
and other such garbage that clutters search engine results, making the
description on the front page amusingly ironic:

"NewsMaestro is a result of years of work and research in an effort to
find a way to reduce the information overload and extract the most
valuable information from the raw information streams. We are
constantly bombarded with tremendous amounts of information, vast
majority of which is pure garbage. Human mind can not possibly digest
this flood of garbage. At the same time, we always need quality
information. When we use regular search engines, we are presented with
99% garbage information. It takes a lot of time and effort to sift
through it in order to find the information we are looking for."

It appears to be nothing more than a bunch of HTML pages generated by
somebody's data mining equivalent of "Hello World". While it's an
admirable attempt, the author's poor attitude negates any positive
comments that could be made about the site.

The author himself does not appear to be proud enough of his content
to put his own name on it. This seems minor but gives what could be a
legitimate site the feel of yet another generated MFA scraper site
that engines like Google will ultimately filter as unwanted clutter
and relegate to page 30 of any reasonable set of search results.

Additionally, the author's tendency to post immature responses such as
calling somebody a "donkeyass" and otherwise generally behaving like a
slightly post-pubescent male does not give his work the air of
credibility that he may expect. Recent trolling behavior on other
threads in comp.lang.c++ do not help his cause, and for the most part
make it nearly impossible to view his site seriously. The rather large
cross-post is a bit of a nuisance as well (additionally, discussions
of MFC are off-topic in both c.l.c and c.l.c++, but even more so in
c.l.c).

That said, the site could be going in a good direction. The addition
of a search feature, threaded topics, and context information around
each category's list of extracted links could, in fact, make the site
quite useful. The concept of grouping by category rather than by
newsgroup (although the grouping needs quite a good amount of work, I
see more than a few miscategorized pages) is interesting, as well as
the idea of extracting links from posts (displaying an contextless
list of raw URLs, however, is not useful). A more positive and
professional attitude on the part of the anonymous author would also
serve to make a better impression on potential users. In it's current
state, and given the author's attitude, the site is, indeed, crap.

Jason


== 4 of 5 ==
Date: Fri, Jan 2 2009 10:08 pm
From: JC


On Jan 2, 10:54 pm, "jason.cipri...@gmail.com"
<jason.cipri...@gmail.com> wrote:
> On Jan 2, 9:47 am, "David Ching" <d...@remove-this.dcsoft.com> wrote:
>
> > "Labyrinth" <en...@exit.here> wrote in message
>
> >news:gjl02l$29b$3@news.albasani.net...
>
> > > I bet you are writting the buggiest code there is,
> > > so sloppy is your "arguments". Actually, I do not
> > > see a SINGLE argument woth of of anything of any value.
>
> > Heh, Jonathan is one of the "experts" here whom you should definitely filter
> > in on your website.
>
> It's actually not that great of a site, for a couple of reasons, some
> dealing with the site itself, other dealing with the author.
>
> The content on the site is vaguely indexed into general categories but
> is otherwise an unsearchable glob of random forum posts and bits of
> source code pulled off of MSDN newsgroups and other limited sources.
> It provides no advantage over visiting your search engine of choice
> and typing the keywords you are looking for. In fact, it does not even
> provide an advantage over simply browsing through the newsgroups
> themselves, as it provides you only with lists of out-of-context links
> and out-of-order posts, with no threading and no organization of any
> bits of information you may stumble upon.
>
> The site is simply yet another scraper site plus a bit of AdSense on
> the front pages. It's reminiscent of scraper sites like Encyclocentral
> and other such garbage that clutters search engine results, making the
> description on the front page amusingly ironic:
>
> "NewsMaestro is a result of years of work and research in an effort to
> find a way to reduce the information overload and extract the most
> valuable information from the raw information streams. We are
> constantly bombarded with tremendous amounts of information, vast
> majority of which is pure garbage. Human mind can not possibly digest
> this flood of garbage. At the same time, we always need quality
> information. When we use regular search engines, we are presented with
> 99% garbage information. It takes a lot of time and effort to sift
> through it in order to find the information we are looking for."
>
> It appears to be nothing more than a bunch of HTML pages generated by
> somebody's data mining equivalent of "Hello World". While it's an
> admirable attempt, the author's poor attitude negates any positive
> comments that could be made about the site.
>
> The author himself does not appear to be proud enough of his content
> to put his own name on it. This seems minor but gives what could be a
> legitimate site the feel of yet another generated MFA scraper site
> that engines like Google will ultimately filter as unwanted clutter
> and relegate to page 30 of any reasonable set of search results.
>
> Additionally, the author's tendency to post immature responses such as
> calling somebody a "donkeyass" and otherwise generally behaving like a
> slightly post-pubescent male does not give his work the air of
> credibility that he may expect. Recent trolling behavior on other
> threads in comp.lang.c++ do not help his cause, and for the most part
> make it nearly impossible to view his site seriously. The rather large
> cross-post is a bit of a nuisance as well (additionally, discussions
> of MFC are off-topic in both c.l.c and c.l.c++, but even more so in
> c.l.c).

Adding to this, the author, "Labyrinth" seems to have canceled all of
his messages in this thread. The full archive including original posts
is available here for reference:

http://groups.google.com/group/comp.lang.c/browse_frm/thread/cd8333fd25b20df2

> That said, the site could be going in a good direction. The addition
> of a search feature, threaded topics, and context information around
> each category's list of extracted links could, in fact, make the site
> quite useful. The concept of grouping by category rather than by
> newsgroup (although the grouping needs quite a good amount of work, I
> see more than a few miscategorized pages) is interesting, as well as
> the idea of extracting links from posts (displaying an contextless
> list of raw URLs, however, is not useful). A more positive and
> professional attitude on the part of the anonymous author would also
> serve to make a better impression on potential users. In it's current
> state, and given the author's attitude, the site is, indeed, crap.


Jason

== 5 of 5 ==
Date: Fri, Jan 2 2009 11:45 pm
From: Richard Heathfield


Labyrinth said:

> In article <Zqidnc8gWoZdMsDUnZ2dnUVZ8sXinZ2d@bt.com>,
> rjh@see.sig.invalid wrote:
>>Labyrinth said:
>>
>><snip>
>>
>>> even though they pump their chests
>>> like Alexander Da Great, Napoleon or Adolph Hitler.
>>
>>Godwin's Law applies - you just lost your argument.
>
> First of all, I have no argument.

Neither do you have the power to persuade.

> I am too busy for that stuff.

And you're no good at it anyway.

> You can aruge here all day long, till your nose goes blue.
> Doesn't matter to me.

Nor does your site matter to this newsgroup.

> Just don't get nasty.

Pointing out your nastiness doesn't count as nastiness, IMHO.

<snip>

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999

==============================================================================
TOPIC: "#define" vs "const int"
http://groups.google.com/group/comp.lang.c++/t/6af68a548d4c7cba?hl=en
==============================================================================

== 1 of 3 ==
Date: Fri, Jan 2 2009 8:12 pm
From: blargg.h4g@gishpuppy.com (blargg)


Chris Gordon-Smith wrote:
> On 2008-12-31 21:13:57 -0500, blargg.h4g@gishpuppy.com (blargg) said:
>> Can't you figure it out? Macros are EVIL. That means we CANNOT even
>> talk about them or think about their behavior. We must convert
>> everyone into a believer and ensure they never discuss macros, other
>> than to argue against all mention/use of them. Our minds are fragile,
>> and the moment we start to contemplate macros versus alternatives,
>> even if only hypothetically in order to shed light on other issues, we
>> will lose all discipline and plunge ourselves into pre-C++ darkness.
>
> This seems to be an unnecessarily absolutist point of view. It is true that
> in many cases macros are not the best approach. However, they do have their
> place. Include guards for example.

Whoosh!


== 2 of 3 ==
Date: Fri, Jan 2 2009 9:41 pm
From: "Tony"

"Rolf Magnus" <ramagnus@t-online.de> wrote in message
news:gjff8f$qo8$00$1@news.t-online.com...
> Pete Becker wrote:
>
>> On 2008-12-30 16:05:24 -0500, Jeff Schwab <jeff@schwabcenter.com> said:
>>
>>> Pete Becker wrote:
>>>> On 2008-12-30 11:28:46 -0500, pjb@informatimago.com (Pascal J.
>>>> Bourguignon) said:
>>>>
>>>>>
>>>>> So you really don't want to think about these matters. Just write:
>>>>> const int foo=4; since that's what the language provides you, and
>>>>> since it gives more information than #define foo 4 to the compiler,
>>>>> chances are it will be able to generate more optimized code, but you
>>>>> shouldn't care.
>>>>
>>>>
>>>> What additional information does it give the compiler? Obviously,
>>>> unlike a manifest constant, the code could take its address, but that
>>>> inhibits rather than enhances optimization.
>>>
>>> It's not so much that "const foo" gives the compiler additional
>>> information, but that the macro potentially hides information, e.g.
>>> replacing all uses of the name "foo" within subsequent namespaces and
>>> function definitions.
>>
>> Yes, eveyone knows that macros are evil. But they're not as evil as
>> everyone thinks they are.
>
> It doesn't matter much how "evil" they are. If there is a better way to do
> the same, then why not use that? Macros are only used as replacements for
> constants because people are used to that from C, which lacks support for
> real constants. Otherwise, nobody would even think about using a macro for
> that.

"Better" is subjective. I don't consider using a #define for a constant a
"macro". That said, I recently started using consts instead of #defines, but
it really is a miniscule thing relative to other things. I did notice that
while a #define "worked" everywhere, with consts sometimes there are integer
width and sign warnings. I started using consts because I figure it doesn't
involve a lot of compiler machinery to implement and I have well defined and
evolved uses of the preprocessor and don't see any benefit to keeping that
"functionality" there. All in all, it's such a trivial point in most cases.

Tony


== 3 of 3 ==
Date: Fri, Jan 2 2009 10:30 pm
From: blargg.h4g@gishpuppy.com (blargg)


Tony wrote:
> I don't consider using a #define for a constant a "macro".

The compiler/preprocessor does. Here are some problems with macros
used for constants.

A macro does general text replacement:

#define foo 1

struct bar { int foo; }; // error


Expression must be parenthesized:

#define foo 1+1

int i = foo * 2; // unexpected result


Avoiding name clashes by using convention of all-uppercase is ugly:

#define FOO 1 // ugly name


Macros aren't scoped:

void f1()
{
#define FOO 1
}

void f2()
{
#define FOO 2 // error, redefinition
}

Syntax differs from normal object declaration/initialization:

#define FOO 1
int bar = 1;


> That said, I recently started using consts instead of #defines,
> but it really is a miniscule thing relative to other things.
[...]

Not if you use them in your library's header files, where they can
cause problems your client's code.

==============================================================================
TOPIC: Any mechanism to make STL compilation errors more readable?
http://groups.google.com/group/comp.lang.c++/t/98c59eaf6a828671?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, Jan 2 2009 9:43 pm
From: ccalls001@gmail.com


Hello,

Apologies if this has been asked and answered before. I tried
searching for it but could not find a good answer.

Is there any mechanism (like an external script or anything really)
that would parse out the giant compilation errors printed out (mostly
related to STL) and emit out a bit more readable information. For
example, when I get a compilation error about a vector<string>, most
of the times I do not really need to know about so many details about
strings.

I know purists will disagree :-) and I completely agree that one
should write code that just compiles :-), but then I am a human being
and these 10 page long errors are really killing me.

Please do reply if you know.

--
Bruce
----------------------------------------------------------------------------------------------
Life is the art of drawing sufficient conclusions from insufficient
premises.

My finance blog:
Smarter investments using covered calls - http://covcalls.blogspot.com
----------------------------------------------------------------------------------------------


== 2 of 2 ==
Date: Fri, Jan 2 2009 10:50 pm
From: "jason.cipriani@gmail.com"


On Jan 3, 12:43 am, ccalls...@gmail.com wrote:
> Hello,
>
> Apologies if this has been asked and answered before. I tried
> searching for it but could not find a good answer.
>
> Is there any mechanism (like an external script or anything really)
> that would parse out the giant compilation errors printed out (mostly
> related to STL) and emit out a bit more readable information. For
> example, when I get a compilation error about a vector<string>, most
> of the times I do not really need to know about so many details about
> strings.
>
> I know purists will disagree :-) and I completely agree that one
> should write code that just compiles :-), but then I am a human being
> and these 10 page long errors are really killing me.


In fact, there is an excellent error message filter designed
specifically for that purpose here:

http://www.bdsoft.com/tools/stlfilt.html

It is compatible with most common compilers and IDE's.


Jason

==============================================================================
TOPIC: C++ improvements: my 2008 summary
http://groups.google.com/group/comp.lang.c++/t/bd9fbd78c03cf774?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jan 2 2009 10:05 pm
From: "vib.cpp@gmail.com"


On Jan 1, 1:29 pm, Grizlyk <grizl...@yandex.ru> wrote:
> To continue some ideas of message "C++ improvements: core and user
> properties, default compiler ".
>
> Hi, boys and girls, what news on Pluke :)?
>
> Concerning the C++ improvements.
>
> The proccess hardly move and there are nothing to be proud, but some
> things are done.
>
> In spite of the fact, that there are no great interest for the ideas
> in the group, i am publishing the snapshort of some parts of current
> state of the development, because i myself never did the kind of work
> (programming language improvement) befor and the improvements are not
> private, so i will not angry if anyone will make it faster and better
> than i do.
>
> 1. Human-oriented representation of C++ source code.
>
> The original C++ language, divided into two parts (cC++/uC++) must
> have representation of source code for each part for human usage.
>
> While considering the representation we can find, that with the user
> part (uC++), to support OO design we neeed to have ability to easy
> export not only interfaces of code, but implementations - parts of
> open source code and copirighted compiled code from one project to
> another.
>
> The current C++ way of exporting implementation, inherited from C, is
> creation a solid "compilation units", source code of which is hard
> linked (often with the help of preprocessor) with development
> environment of source project. The linkage is so deep, that often even
> just a project itself can not be exported to other compatible machine
> without valuable changes of the project, but export a part of the code
> into other project is very non-trivial thing.
>
> - The problem here is much more complex source code for C++, than for
> C.
>
> The problem is representation of source code. The current way of
> abstracion as "some units with interface and implementation" by
> "class" or by "compilation unit" is not enough to export
> implementation of methods to increase reusage of code. The _effective_
> instantiation of OO messages in language with reach low-level
> properties requires export implementation of single, separated methods
> of class or namespace.
>
> - The problem here is the fundamental problem of "function".
>
> "Function" has "interface" (list of parameters and return value), but
> links of the function to other, external resources (resources are not
> defined inside the function local scope), have no any "interfaces". I
> decided, that the unspecified, unlimited, unchecked access to external
> resources makes "function" open in bad reason - inportable.
>
> - The problems of C++ name lookup.
>
> The related question is the fact, the C++, unlike C, has non-boolean
> name lookup, in other words, names of C++ can be placed not only in
> global or local scope, that is why C++ can not just extend simple
> rules of C-style boolean name lookup.
>
> Using the several facts i offer to consider "function" as an
> abstraction with pair of interfaces: "front end interface" (ordinary)
> and "back end interface" (new). The goal of the rear interface is
> - explitely specification of external resources for each function (the
> same as now ordinary function explitely specifies own ordinary
> interface);
> - using types to the kind of specification of externals.
>
> The way to move software from one project to another is "on fly"
> substitution of correct type of externals (applying correct type of
> back end interface) during insertion code from one project to another.
>
> 2. What kind of syntax can be introduced for C++ to express back-end
> function interface, to make typed access to external resource?
>
> Any thing can not be infinitly improved by a little inheritance of
> original thing, because during the evolution we find a point, where
> valuable changes must be done to reach result and the new thing will
> be enogh incompatible with original thing.
>
> The all above force me to the idea, that C++ can not be easy improved
> into the pair c/u, the source language requires dramatic, important,
> valueable and visible changes, to lose all inherited "bad" prorerties
> and new language can not be compatible with old C++ (old C++ can be
> represented as dialect of new only).
>
> It is not very good news, because any easy improvements of C++ are
> much easy to do than invention of quite new language.
>
> The idea of the explicit declaration of externals for each portable
> part of code has technical problems, the declarations of external are
> hard to be coded, in fact all not explicitly declared names will be
> errors.
>
> But with IDE, integrated into language, as uC++ does, the most trivial
> way as "hit the problem by own forehead" can be used with success, the
> IDE can hide any trivial operations, finds new names from code,
> creates records for the names in declaration of back end interface and
> user will control the existed records only.
>
> The fact of IDE intergrated into language changes the syntax very
> much, in fact the presence of IDE is the similar to presence of
> english letters and digits in keyboard.
>
> I am not sure, that function with two interfaces is smart idea and i
> have no "complete theory of comparison the two kind of functions with
> program design", but some artificial examples looks quite successfull
> and now i consider the idea as working.
>
> 3. Summary.
>
> All encountered problems of C++ improvements still can not set the
> process of improvement into state of separated properties to upgrade,
> i still did not find independed "bones" of uC++, from any
> improvements.
>
> best regards

i cannot figure out what you write this for?can you explain?Is it some
notes you made during your learning cpp?

==============================================================================
TOPIC: need more knowledge about the memory!
http://groups.google.com/group/comp.lang.c++/t/d80a3b0d99aeb22c?hl=en
==============================================================================

== 1 of 3 ==
Date: Fri, Jan 2 2009 10:25 pm
From: "vib.cpp@gmail.com"


Can anybody introduce me a book to get familiar with those memory
stuffs, like stack, free store and so on. I always met those things
when reading a book, I just find I do not clear how the memory is
"divided" or "separated", and what the standard is ,too wicked for me!


== 2 of 3 ==
Date: Fri, Jan 2 2009 10:46 pm
From: "jason.cipriani@gmail.com"


On Jan 3, 1:25 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
> Can anybody introduce me a book to get familiar with those memory
> stuffs, like stack, free store and so on. I always met those things
> when reading a book, I just find I do not clear how the memory is
> "divided" or "separated", and what the standard is ,too wicked for me!

There is a really, really good explanation here:

http://cslibrary.stanford.edu/102/

It's a relatively small PDF that's geared towards beginners and
explains everything very clearly. I highly recommend it. After you
read it, there is a strange but informative video illustrating how
pointers work here:

http://cslibrary.stanford.edu/104/

Read the PDF, watch the video, and hopefully it will clear up a lot of
issues. You will likely also find a lot of information and good
starting points in the official comp.lang.c++ FAQ here:

http://www.parashift.com/c++-faq-lite/

HTH,
Jason


== 3 of 3 ==
Date: Fri, Jan 2 2009 10:47 pm
From: "jason.cipriani@gmail.com"


On Jan 3, 1:46 am, "jason.cipri...@gmail.com"
<jason.cipri...@gmail.com> wrote:
> On Jan 3, 1:25 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
>
> > Can anybody introduce me a book to get familiar with those memory
> > stuffs, like stack, free store and so on. I always met those things
> > when reading a book, I just find I do not clear how the memory is
> > "divided" or "separated", and what the standard is ,too wicked for me!
>
> There is a really, really good explanation here:
>
> http://cslibrary.stanford.edu/102/
>
> It's a relatively small PDF that's geared towards beginners and
> explains everything very clearly. I highly recommend it. After you
> read it, there is a strange but informative video illustrating how
> pointers work here:
>
> http://cslibrary.stanford.edu/104/

In fact, watch the video first.

> Read the PDF, watch the video, and hopefully it will clear up a lot of
> issues. You will likely also find a lot of information and good
> starting points in the official comp.lang.c++ FAQ here:
>
> http://www.parashift.com/c++-faq-lite/


Jason


==============================================================================
TOPIC: What will the compiler react if I initialize a pointer like "Int *pt=6"?

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

== 1 of 5 ==
Date: Fri, Jan 2 2009 10:29 pm
From: "vib.cpp@gmail.com"


What will the compiler react if I initialize a pointer in this way?
Int *pt=6;
I know it is not right,but i do not why?can anybody make it more clear?
3ks in advance,


== 2 of 5 ==
Date: Fri, Jan 2 2009 10:43 pm
From: "jason.cipriani@gmail.com"


On Jan 3, 1:29 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
> What will the compiler react if I initialize a pointer in this way?
> Int *pt=6;
> I know it is not right,but i do not why?can anybody make it more clear?
> 3ks in advance,

How did it react when you tried it? Also, there is no such type as
"Int".

The reason it is not right is because 'pt' is a pointer to an int, and
6 is just an int. The types are not compatible. You can not initialize
a pointer's value from an integer.

Jason


== 3 of 5 ==
Date: Fri, Jan 2 2009 10:51 pm
From: "vib.cpp@gmail.com"


On Jan 3, 2:43 pm, "jason.cipri...@gmail.com"
<jason.cipri...@gmail.com> wrote:
> On Jan 3, 1:29 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
>
> > What will the compiler react if I initialize a pointer in this way?
> > Int *pt=6;
> > I know it is not right,but i do not why?can anybody make it more clear?
> > 3ks in advance,
>
> How did it react when you tried it? Also, there is no such type as
> "Int".
>
> The reason it is not right is because 'pt' is a pointer to an int, and
> 6 is just an int. The types are not compatible. You can not initialize
> a pointer's value from an integer.
>
> Jason

thank you joson:
when i write:

main()
{
int *pa=6;
}
it will be equivalent as:

(a)
main()
{
int *pa;
pa=6;
}

or

(b)
main()
{
int *pa;
*pa=6;
}

and

main()
{
int *pa;
*pa=6;
}
is not right so.


but why it works if 6 is replaced by 0:

main()
{
int *pa=0;
}


== 4 of 5 ==
Date: Fri, Jan 2 2009 10:57 pm
From: "jason.cipriani@gmail.com"


On Jan 3, 1:51 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
> On Jan 3, 2:43 pm, "jason.cipri...@gmail.com"
>
>
>
> <jason.cipri...@gmail.com> wrote:
> > On Jan 3, 1:29 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
>
> > > What will the compiler react if I initialize a pointer in this way?
> > > Int *pt=6;
> > > I know it is not right,but i do not why?can anybody make it more clear?
> > > 3ks in advance,
>
> > How did it react when you tried it? Also, there is no such type as
> > "Int".
>
> > The reason it is not right is because 'pt' is a pointer to an int, and
> > 6 is just an int. The types are not compatible. You can not initialize
> > a pointer's value from an integer.
>
> > Jason
>
> thank you joson:
> when i write:


I strictly refuse to answer any of these questions until after you've
at least watched the video I linked to in your other thread:

http://cslibrary.stanford.edu/104/

Once you watch that, come back with any additional questions you might
have. It covers pretty much all of what you did below.

Jason


> main()
> {
> int *pa=6;}
>
> it will be equivalent as:
>
> (a)
> main()
> {
> int *pa;
> pa=6;
>
> }
>
> or
>
> (b)
> main()
> {
> int *pa;
> *pa=6;
>
> }
>
> and
>
> main()
> {
> int *pa;
> *pa=6;}
>
> is not right so.
>
> but why it works if 6 is replaced by 0:
>
> main()
> {
> int *pa=0;
>
> }

== 5 of 5 ==
Date: Fri, Jan 2 2009 11:58 pm
From: "jason.cipriani@gmail.com"


On Jan 3, 1:51 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
> On Jan 3, 2:43 pm, "jason.cipri...@gmail.com"
>
>
>
> <jason.cipri...@gmail.com> wrote:
> > On Jan 3, 1:29 am, "vib....@gmail.com" <vib....@gmail.com> wrote:
>
> > > What will the compiler react if I initialize a pointer in this way?
> > > Int *pt=6;
> > > I know it is not right,but i do not why?can anybody make it more clear?
> > > 3ks in advance,
>
> > How did it react when you tried it? Also, there is no such type as
> > "Int".
>
> > The reason it is not right is because 'pt' is a pointer to an int, and
> > 6 is just an int. The types are not compatible. You can not initialize
> > a pointer's value from an integer.
>
> > Jason
>
> thank you joson:
> when i write:


I guess some of these things aren't answered there, so:


> main()
> {
> int *pa=6;}
>
> it will be equivalent as:
>
> (a)
> main()
> {
> int *pa;
> pa=6;
>
> }
>
> or
>
> (b)
> main()
> {
> int *pa;
> *pa=6;
>
> }


It ("int *pa=6") is equivalent to (a). Neither (a) nor (b) are
correct, however, and (a) should not compile. With (a), you are
attempting to set the pointer itself to the value 6 -- this is
something like trying to make it point to memory address 6. It doesn't
make any sense, and is not valid. With (b), you should now be able to
spot the problem.


> and
>
> main()
> {
> int *pa;
> *pa=6;}
>
> is not right so.
>
> but why it works if 6 is replaced by 0:
>
> main()
> {
> int *pa=0;
>
> }


It works with 0 because 0 is a special case value representing a NULL
pointer (although it is generally clearer if you use "NULL" instead of
"0", #include <cstring> to get NULL). In general, you can't assign an
integer to a pointer, but the standard makes an explicit exception for
the value 0.

Jason

==============================================================================
TOPIC: Why do people still use C instead of C++ ?
http://groups.google.com/group/comp.lang.c++/t/83ec35fb1ade5f05?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jan 2 2009 10:43 pm
From: "vib.cpp@gmail.com"


On Dec 26 2008, 6:11 am, Lawand <lawan...@gmail.com> wrote:
> Hello.
>
> AFAIKnew, people used to choose C over C++ as a programming language
> for their projects because it posses better performance and execution
> speed, but after I read this article <a herf="http://unthought.net/c++/
> c_vs_c++.htmle">(C versus C++)</a> I noticed that C++ beats C in
> benchmarking so, why does any programmer on earth still use/learn/
> teach C instead of C++?
>
> Shouldn't C++ have replaced C? even when developing an OS kernel or
> such sensitive software.

i am now learning c++ for several months,with a book said i do not
have a pre-knowledge of c language,but when i know something about
cpp,a stronger feeling is that i must go and find some c language book
to solid my foundation now.I think some fundamental knowledge of
programming is easier to get familiar with from c ,

==============================================================================
TOPIC: unresolved external symbol
http://groups.google.com/group/comp.lang.c++/t/442a4e06bd2037f8?hl=en
==============================================================================

== 1 of 2 ==
Date: Fri, Jan 2 2009 10:55 pm
From: Michael Sgier


Hi
I've included the SDL_image.h but get:

C12 error LNK2019: unresolved external symbol _SDL_RWFromFile referenced
in function "int __cdecl LoadGLTexture(char *,int)"
(?LoadGLTexture@@YAHPADH@Z)

WHY?
Thanks Michael


== 2 of 2 ==
Date: Fri, Jan 2 2009 11:01 pm
From: "jason.cipriani@gmail.com"


On Jan 3, 1:55 am, Michael Sgier <sg...@nospam.com> wrote:
> Hi
> I've included the SDL_image.h but get:
>
> C12 error LNK2019: unresolved external symbol _SDL_RWFromFile referenced
> in function "int __cdecl LoadGLTexture(char *,int)"
> (?LoadGLTexture@@YAHPADH@Z)
>
> WHY?


You are getting that error because the function LoadGLTexture is
referencing the symbol _SDL_RWFromFile, which is not defined in any of
the object files or libraries you've linked to. Be sure you are
linking to all of the required SDL libraries.

This question is off topic here; if you need additional help, you
should ask on SDL's mailing list / newsgroup / forum / IRC channel /
etc. (check their web site, there is likely a link to help somewhere).


Jason

==============================================================================
TOPIC: a simple question
http://groups.google.com/group/comp.lang.c++/t/5024236a053d7dcc?hl=en
==============================================================================

== 1 of 1 ==
Date: Fri, Jan 2 2009 11:55 pm
From: hpsoar


On 1月2日, 下午8时08分, Chris Gordon-Smith <use.addr...@my.homepage> wrote:
> hpsoar wrote:
> > On 1月1日, 下午3时29分, red floyd <no.spam.h...@example.com> wrote:
> >> hpsoar wrote:
> >> > On 1月1日, 下午12时19分, Sam <s...@email-scan.com> wrote:
> >> >> application_pgp-signature_part
> >> >> < 1K查看下载
>
> >> >> hpsoar writes:
> >> >>> Hello every one, I'm new here, and I'm also new to C++, I have just
> >> >>> learned a C++ course, and I want to know what you usually do with
> >> >>> C++.
> >> >> I use it to earn a living.
> >> > Can you give some details, such as what kind of project you do with C+
> >> > +
>
> >> I wrote missile avionics software, as well as missile defense algorithms.
>
> > That's great! That must be a tough and challenge work, and you must be
> > a excellent programer. Can you give me some tips in learning C++ and
> > developing project in C++. I'm a 21 year old college student of grade
> > 3, and found myself lack of knowledge. Know I decide to settle down to
> > learn C++ well.
>
> Here are my top 3 suggestions:-
>
> 1) Start programming!
> 2) Use the Standard Template Library (STL)
> 3) Read a good book:-
>
> Accelerated C++ is generally recommended. Some of my favourites are:-
>
> * Effective C++
> * The C++ Programming Language (Stroustrup)
> * More Effective C++
> * C++ In a Nutshell (for reference)
> * C++ Gotchas
> * Josuttis' book on the STL
> * C++ Coding Standards (Sutter / Alexandrescu)
>
> I also suggest you have a look at Bjarne Stroutsrtup's website.
>
> Chris Gordon-Smithwww.simsoup.info- 隐藏被引用文字 -
>
> - 显示引用的文字 -

thank you for all of you suggestions, I appriciate these very much,
and good wishes to you.


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

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