From: Nielsen Linus <Linus.Nielsen@elema.siemens.se>
To: ecos-discuss@sources.redhat.com
Subject: RE: [ECOS] using struct
Date: Fri, 27 Apr 2001 03:49:00 -0000 [thread overview]
Message-ID: <63E7EC6F3685D311B640080006279198066A055C@visbur.siemens.se> (raw)
...and if you read my last post, you will probably understand
that I have been too much into C++ lately.
The answer to you question is of course that in C, you cannot
leave out the keyword "struct" from your variable declaration.
You code should look like this:
struct hola_type {
int a;
};
struct hola_type hola;
hola.a = 5; // This is 54 line.
But still, this is a C question, not eCos.
/Linus
> Hi all.
>
> A simple question:
>
> Can I use struct in ecos?
>
> I tried to declare a struct inside a thread:
>
> static void stimulus( cyg_addrword_t data )
> {
> int i, j;
>
> struct hola{
> int a;
> };
>
> hola.a = 5; // This is 54 line.
> ..
> ..
> }
>
> }
>
> and i have the following error message:
> sync_mbox.c:54: `hola' undeclared (first use in this
> function)
>
> Thanks
>
> Best regards..
>
> Carlos Camargo
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
>
next reply other threads:[~2001-04-27 3:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-27 3:49 Nielsen Linus [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-04-27 3:31 Nielsen Linus
2001-04-27 2:51 Carlos Camargo
2001-04-27 3:18 ` Andrew Lunn
2001-04-27 3:21 ` Martin van Veen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=63E7EC6F3685D311B640080006279198066A055C@visbur.siemens.se \
--to=linus.nielsen@elema.siemens.se \
--cc=ecos-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).