Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: assianing value of pointer |
| Date | 2012-06-25 20:29 -0700 |
| Organization | None to speak of |
| Message-ID | <ln8vfa699r.fsf@nuthaus.mib.org> (permalink) |
| References | <94fab173-d4ca-49f7-b2fa-a787c26b095a@d6g2000pbt.googlegroups.com> <jsb9cq$tu6$1@dont-email.me> |
James Kuyper <jameskuyper@verizon.net> writes:
> On 06/25/2012 10:49 PM, vj wrote:
>> is it a valid statement if no y
>
> What does 'y' have to do with it?
I think the OP meant:
Is it a valid statement? If not, why?
Note to vj: Please don't use silly abbreviations like 'y' for "why".
>> int *p=&x, x;
>
> First of all, that's a pair of declarations, it's not a statement.
> Secondly, unless there's prior declaration of x that will end up being
> hidden by this one, you're trying to use 'x' before it's been declared.
> That's easily fixed:
>
> int x, *p=&x;
Or, even better:
int x;
int *p = &x;
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Will write code for food.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
assianing value of pointer vj <itc.vijay@gmail.com> - 2012-06-25 19:49 -0700
Re: assianing value of pointer James Kuyper <jameskuyper@verizon.net> - 2012-06-25 23:13 -0400
Re: assianing value of pointer Keith Thompson <kst-u@mib.org> - 2012-06-25 20:29 -0700
Re: assianing value of pointer Tim Rentsch <txr@alumni.caltech.edu> - 2012-06-26 06:42 -0700
csiph-web