Expert C Programming: Deep Secrets
Prentice Hall, 14. jun. 1994 - 384 strani
This book is for the knowledgeable C programmer, this is a second book that gives the C programmers advanced tips and tricks. This book will help the C programmer reach new heights as a professional. Organized to make it easy for the reader to scan to sections that are relevant to their immediate needs.
Zadetki 1–3 od 17
Typedefs are a funny kind of declaration: they introduce a new name for a type
rather than reserving space for a variable. In some ways, a typedef is similar to
macro text replacement—it doesn't introduce a new type, just a new name for a
typedef void (*ptr_to_func) (int); /* this says that ptr_to_func is a pointer to a
function * that takes an int argument, and returns void */ ptr_to_func signal(int,
ptr_to_func); /* this says that signal is a function that takes * two arguments, an int
and a ...
typedef int (*array_ptr); Just write a declaration for a variable with the type
you desire. Have the name of the variable be the name you want for the alias.
Write the keyword 'typedef' at the start, as shown above. A typedef name cannot
Mnenja - Napišite recenzijo
LibraryThing ReviewUporabnikova ocena - kalafjj - LibraryThing
A very enjoyable read. Not only will you learn aspects of C in great detail (the section on pointers vs. array is excellent), but the author writes in a witty manner I haven't typically found in programming books. (The style reminded me a bit of Programming Perl by Larry Wall.) Celotno mnenje
1 C Through the Mists of Time
2 Its Not a Bug Its a Language Feature
3 Unscrambling Declarations in C
10 preostalih delov ni prikazanih