This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: problem in ascessing structure member
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Aravind B <arvindb at cranessoftware dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 11 May 2004 17:52:27 +0200
- Subject: Re: [ECOS] problem in ascessing structure member
- References: <1084277055.3359.9.camel@ambica>
On Tue, May 11, 2004 at 05:34:15PM +0530, Aravind B wrote:
This has nothing to do with eCos, its a very basic C question.
> void procedureA(cyg_addrword_t data)
> {
> str1 s1;
> str2 s2;
> s1.a='a';
> s1.ptr->b=10;
s1.ptr has not been initialised, so you have now overwritten some
random location with 10!
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss