Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | bilsch <king621@comcast.net> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: printing members of a structure |
| Date | 2015-02-27 10:37 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mcphds$vq$3@dont-email.me> (permalink) |
| References | <mcop3s$953$4@dont-email.me> <claajmFr6qaU1@mid.individual.net> <mcp9ep$vq$1@dont-email.me> <mcp9lu$g35$1@dont-email.me> |
>>
>>
>>
> If the following doesn't work...
>
> SDL_VideoInfo *p = SDL_GetVideoInfo();
>
> if(p != NULL)
> {
> printf("hw_available: %lu\n", p->hw_available);
> }
> else {
> fprintf(stderr, "It's very dark in here\n");
> }
It works. Let me tell what I see:
First line declares a pointer to type SDL_VideoInfo and initializes it to
the value returned by SDL_GetVideoInfo. p is an address.
Next check if p is something besides NULL.
If yes get 32 bits from hw_available and print as long unsigned integer.
I have never seen the notation -> before (except Mr. Schwarz post).
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
printing members of a structure bilsch <king621@comcast.net> - 2015-02-27 03:42 +0000
Re: printing members of a structure Ian Collins <ian-news@hotmail.com> - 2015-02-27 17:37 +1300
Re: printing members of a structure bilsch <king621@comcast.net> - 2015-02-27 08:21 +0000
Re: printing members of a structure Richard Heathfield <rjh@cpax.org.uk> - 2015-02-27 08:26 +0000
Re: printing members of a structure bilsch <king621@comcast.net> - 2015-02-27 10:37 +0000
Re: printing members of a structure Barry Schwarz <schwarzb@dqel.com> - 2015-02-27 03:16 -0800
Re: printing members of a structure bilsch <king621@comcast.net> - 2015-02-27 12:52 +0000
Re: printing members of a structure jt@toerring.de (Jens Thoms Toerring) - 2015-02-27 11:25 +0000
Re: printing members of a structure jt@toerring.de (Jens Thoms Toerring) - 2015-02-27 11:31 +0000
Re: printing members of a structure bilsch <king621@comcast.net> - 2015-02-27 22:58 +0000
Re: printing members of a structure Keith Thompson <kst-u@mib.org> - 2015-02-27 08:20 -0800
Re: printing members of a structure bilsch <king621@comcast.net> - 2015-02-27 22:55 +0000
Re: printing members of a structure Barry Schwarz <schwarzb@dqel.com> - 2015-02-26 22:03 -0800
Re: printing members of a structure Chad <cdalten@gmail.com> - 2015-02-26 23:06 -0800
Re: printing members of a structure bilsch <king621@comcast.net> - 2015-02-27 08:23 +0000
Re: printing members of a structure Nick Bowler <nbowler@draconx.ca> - 2015-03-02 18:40 +0000
Re: printing members of a structure James Kuyper <jameskuyper@verizon.net> - 2015-03-02 14:28 -0500
Re: printing members of a structure Nick Bowler <nbowler@draconx.ca> - 2015-03-03 15:07 +0000
csiph-web