Re: A question on string literals
- From: Joe Wright <jwright@xxxxxxxxxxx>
- Date: Tue, 16 Aug 2005 18:03:29 -0400
Chris Torek wrote:
[ snip ]
Once you understand the idea of "object context" and "value context", you simply have to memorize which operators have which context(s):
&foo - object context sizeof foo - object (or maybe even "sizeof") context foo + bar - two value contexts foo = bar - one object context, one value context ++foo - object context
and so on.
I know you Chris and I love you like a brother but given..
int foo = 2, bar = 3; &foo - is the address of foo, a 'value' of type (int*)
sizeof foo - is a value (4 at my house) of type (size_t)
++foo - is a value (now 3) of type (int)None of these have 'object' context as I see it. What are you trying to tell us here?
--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
.- Follow-Ups:
- Re: A question on string literals
- From: Keith Thompson
- Re: A question on string literals
- References:
- A question on string literals
- From: junky_fellow
- Re: A question on string literals
- From: Richard Heathfield
- Re: A question on string literals
- From: pete
- Re: A question on string literals
- From: Richard Heathfield
- Re: A question on string literals
- From: Chris Torek
- A question on string literals
- Prev by Date: Re: How to protect/license a static library? Multiple instances?
- Next by Date: Re: fopen ("file on shared drive","w+") doesn't work on 2nd call using Windows LabView DDL
- Previous by thread: Re: A question on string literals
- Next by thread: Re: A question on string literals
- Index(es):
Relevant Pages
|