Makefiles, and .h files, and .c files, and .o files, OH MY!
Makefiles, and .h files, and .c files, and .o files, OH MY!
For projects with more complexity. (Great.. Just what we needed)
1
Breaking your program into files
? main.c ? stack.c ? stack.h
2
Breaking your program into files
? I have an example on ~cs157/class/7_Makefile
? main.c
? The main function, to actually do the "job"
? stack.c
? The code for a stack of integers.
? stack.h
? The "declarations" of a stack of integers.
3
Why break them up?
? main just needs a stack
? It does not want (or need) to care how it is built or used!
? Smaller files are easier to read ? Faster to compile
? More on this later
? Breaks the program into logical CHUNKS
4
stack.h
typedef struct S_stack { int number; struct S_stack *next;
} stack;
void push(int number, stack **stk_ptr); int pop(stack **stk_ptr);
? No actual code! ? Just "this is the structure" and ? These are the functions. ... "never mind how they work"
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- m y g e o d a t a c l o u d a p i m a n u a l
- instructions itr 1 sahaj a y 2021 22 instructions 1
- chapter 9 scraping sites that use javascript and ajax
- makefiles and h files and c files and o files oh my
- vendor cisco exam code 200 901 exam name developing
- characterizing json tra ic pa erns on a cdn
- database management systems solutions manual
- suricata tutorial carnegie mellon university
- the json libname engine real world applications using
- labelme online image annotation and applications