By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 734 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

Header *morecore(unsigned); /*what is this syntax?*/

P: n/a
K&R2 sec 8.7 reads:

union header{
/*...*/
};
typedef union header Header;

/*...*/
Header *morecore(unsigned); /*?*/

What does the line with a question mark in the end comment mean? Is it
a kind of initialization syntax?

Sep 18 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
lovecreatesbea...@gmail.com schrieb:
K&R2 sec 8.7 reads:

union header{
/*...*/
};
typedef union header Header;

/*...*/
Header *morecore(unsigned); /*?*/

What does the line with a question mark in the end comment mean? Is it
a kind of initialization syntax?
It is a function prototype. Better way to write it:
Header *morecore (unsigned int nu);
See the errata for more information on what is confusing
about section 8.7:
http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html

Reading on may have clarified this for you, too.

Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Sep 18 '06 #2

P: n/a

Michael Mair wrote:
lovecreatesbea...@gmail.com schrieb:
K&R2 sec 8.7 reads:

union header{
/*...*/
};
typedef union header Header;

/*...*/
Header *morecore(unsigned); /*?*/

What does the line with a question mark in the end comment mean? Is it
a kind of initialization syntax?

It is a function prototype. Better way to write it:
Header *morecore (unsigned int nu);
See the errata for more information on what is confusing
about section 8.7:
http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html

Reading on may have clarified this for you, too.

Cheers
Michael
My god! It is. Thank you. I forgot to read the rest of the text.

Sep 18 '06 #3

P: n/a

lovecreatesbea...@gmail.com wrote:
Michael Mair wrote:
lovecreatesbea...@gmail.com schrieb:
K&R2 sec 8.7 reads:
>
union header{
/*...*/
};
typedef union header Header;
>
/*...*/
Header *morecore(unsigned); /*?*/
>
What does the line with a question mark in the end comment mean? Is it
a kind of initialization syntax?
It is a function prototype. Better way to write it:
Header *morecore (unsigned int nu);
See the errata for more information on what is confusing
about section 8.7:
http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html

Reading on may have clarified this for you, too.

Cheers
Michael

My god! It is. Thank you. I forgot to read the rest of the text.
I should make a note with my pencil at the line on the book.

Sep 18 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.