: David Mark
: Learn C on the Mac
: Apress
: 9781430218104
: 1
: CHF 31.30
:
: Allgemeines, Lexika
: English
: 376
: Wasserzeichen/DRM
: PC/MAC/eReader/Tablet
: PDF

Considered a classic by an entire generation of Mac programmers, this popular guide has been updated for Mac OS X. Don't know anything about programming? No problem! Acclaimed authorDave Mark starts out with the basics and takes you through a complete course in programming C using Apple's free Xcode tools. This book is perfect for beginners learning to program. It includes Mac OS X examples!

  • Provides best practices for programming newbies
  • Written by the expert on C-programming for the Mac
  • Presents all the basics with a pragmatic, Mac OS X-flavored approach
  • Incl des updated source code which is fully compatible with Xcode 4


Dave Mark is a longtime Mac developer and author who has written a number of books on Mac and iOS development, including Beginning iPhone 4 Development (Apress, 2010), More iPhone 3 Development (Apress, 2010), Learn C on the Mac (Apress, 2008), The Macintosh Programming Primer series (Addison-Wesley, 1992), and Ultimate Mac Programming (Wiley, 1995). Dave loves the water and spends as much time as possible on it, in it, or near it. He lives with his wife and three children in Virginia.
Contents at a Glance5
Contents6
About the Author13
About theTechnical Reviewer14
Acknowledgments15
Preface16
Welcome Aboard17
Who Is This Book For?17
The Lay of the Land18
Go Get the Tools!20
Create an ADC Account20
Download the Tools21
Installing the Tools23
Take Your Tools for a Test Drive25
Downloading the Book Projects31
Let s Move On31
Programming Basics32
Programming32
The Programming Process35
What s Next?39
C Basics: Functions40
C Functions40
Calling a Function44
A Brief History of C47
The Standard Library48
Exploring Unix and Your Mac s Built-In Manual49
Same Program, Two Functions51
Let s Do That Again, Again, Again58
Generating Some Errors59
C Is Case Sensitive62
What s Next?62
C Basics: Variables and Operators64
An Introduction to Variables65
Operators71
Using Parentheses75
Operator Precedence76
Sample Programs78
Sprucing Up Your Code92
What s Next?97
Controlling Your Program s Flow99
Flow Control99
Expressions102
What s Next?132
Pointers and Parameters134
What Is a Pointer?134
Pointer Basics137
Function Parameters144
What Does All This Have to Do with Pointers?150
Global Variables and Function Returns153
More Sample Programs159
Using the Debugger166
What s Next?170
Variable Data Types173
Data Types Beyond int173
Working with Characters184
Arrays190
Danger, Will Robinson!196
Text Strings197
The #define Directive206
What s Next?215
Designing Your Own Data Structures218
Bundling Your Data218
Model A: Three Arrays219
Finishing Up With Model A231
Model B: The Data Structure Approach233
Passing a struct As a Parameter237
Allocating Your Own Memory242
Working with Linked Lists246
What s Next?258
Working with Files260
What Is a File?261
Working with Files: File Basics261
Working with Files: Writing Files270
Working with Files: Fancier File Manipulation283
What s Next?292
Advanced Topics294
Typecasting294
Unions298
Function Recursion301
Binary Trees305
Function Pointers312
Initializers313
The Remaining Operators316
Creating Your Own Types319
Static Variables321
More on Strings323
What s Next?325
Where Do You Go from Here?328
The Mac User Interface329
One Last Bit of Code331
Go Get Em333
Answers to Exercises334
Chapter 4335
Chapter 5338
Chapter 6339
Chapter 7340
Chapter 8341
Chapter 9343
Chapter 10344
Chapter 11345
Index347