Splitting your C program

When you separate your C program into many files, keep these points in mind: Note: When you define a variable, it looks like this: int globalvar;. When you declare a variable, it looks like this: extern int globalvar;. The main difference is that a variable definition creates the variable, while a declaration indicates that the variable is defined elsewhere. A definition implies a declaration.

PreviousNextIndex

Last updated on Wednesday, June 21, 1995 by Ben Y. Yoshino
Copyright © 1995 University of Hawai`i, College of Engineering, Computer Facility
All rights reserved.