Friday, October 31, 2008

4 new messages in 4 topics - digest

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

comp.lang.c++@googlegroups.com

Today's topics:

* const correctness - should C++ prefer const member over non-const? - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/35cc955f55ea7387?hl=en
* Is c++ only better c ? - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/38527e42967dc124?hl=en
* I dunno what to put as subject - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/149526a32e6b4e41?hl=en
* cast/assignement operators - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/00280114b34902eb?hl=en

==============================================================================
TOPIC: const correctness - should C++ prefer const member over non-const?
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/35cc955f55ea7387?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Oct 30 2008 10:33 pm
From: fungus


On Oct 31, 4:46 am, blargg....@gishpuppy.com (blargg) wrote:
>
>     class Stuff {
>     public:
>         Whatever const& operator [] ( int ) const;
>         Whatever& modify( int );
>     };
>
>     void user( Stuff& myStuff )
>     {
>         Foo f = myStuff[ i ].foo;
>         // ...
>         myStuff.modify( i ).foo = f;
>     }
>

This (or variations on it) works too...


--
<\___/>
/ O O \
\_____/ FTB.

http://www.topaz3d.com/ - New 3D editor!


==============================================================================
TOPIC: Is c++ only better c ?
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/38527e42967dc124?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Oct 30 2008 11:12 pm
From: Ian Collins


Juha Nieminen wrote:
> James Kanze wrote:
>>> The LaTeX equation syntax is *by far* simpler to read and
>>> write by a human.
>> The point is that neither are designed to be read by a human;
>> they are designed to be read my a machine in order to generate
>> output which is read by a human.
>
> That's like saying that the text you just wrote is not designed to be
> read by a human but by a machine (for the sole reason that you are
> writing it with a machine rather than pen and paper).

I thought Perl was off topic here :)

--
Ian Collins


==============================================================================
TOPIC: I dunno what to put as subject
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/149526a32e6b4e41?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Oct 30 2008 11:24 pm
From: Paavo Helde


Anarki <Deepchand.P@gmail.com> kirjutas:

> I have a windows based game i know its name that comes on the title
> bar of the window. To pick up the items in the game i need to press a
> particular key(99% in-game time i have to press this key). In VC++
> (Ver 6.0) i know i could do it with Findwindow and sendmessage
> functions(microsoft specific). Unfortunately i have no setup of VC++
> all i have is g++ in cygwin. I would like to know is it possible to do
> tht program just using g++ in cygwin.

The functionality is part of Windows SDK so it should be accessible also
through cygwin. However, this has nothing to do with C++. You would get
better help in some cygwin list or group.

Paavo


==============================================================================
TOPIC: cast/assignement operators
http://groups.google.com/group/comp.lang.c++/browse_thread/thread/00280114b34902eb?hl=en
==============================================================================

== 1 of 1 ==
Date: Thurs, Oct 30 2008 11:48 pm
From: Paavo Helde


John Doe <mosfet@anonymous.org> kirjutas:

> .rhavin grobert wrote:
>> On 30 Okt., 12:06, Sam <s...@email-scan.com> wrote:
>>> Having said all this, after going through something similar myself,
>>> converting a bunch of code that used MS's gawdawful CString,
>>
>> just curious: what's wrong with CString?
> Have you ever tried to write code on multiplatform ?
> Windows, Windows CE, Symbian, iPhone, ...

Been there, done that. Most cumbersome was to wrap CTime and CFile.
Concerning CString, however, I second Sam in that it should just be
replaced by std::string and all compile errors fixed. The missing methods
(what they might be? OemToAnsi()? Right()?) should be just replaced by free
functions.

> I think you have you answer.
> and the raw std::string is really limited compared to CString that's why
> I am using CStdString.

Nah, from my viewpoint it is CString what is rather limited ;-) It even
does not have find_first_not_of()!

Paavo

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

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: