I guess this could be tricky if you havent wrote code before
Your chart will be something like this:
1 2 3 4 5
|
Box 1 (main)
Box 2 Box 3 Box 4
House- Detail end-of-job
keeping
|
Boxes 2,3, and 4 are connected to main (They are also on the same lair)
They are not connected to each other
Why? When you program in C++, the entry point is a function called "main"
The normal flow for the program would go through all the instructions until you hit the end of main(return).
1 2 3 4 5 6 7 8 9 10 11 12
|
int main() {
line 1
2
3
4
5
6
7
8
9
.....
return 0;
|
If you were to keep all the code in the main module (page) then it would become very lengthy, to help reduce this we create new modules(pages) that help us divide our code.
Now that we have new modules, we can change the flow of control from main to housekeeping
1 2 3 4 5 6 7 8 9 10 11 12 13
|
int main() {
line 1
2
3
4
HouseKeeping()
// Main gives control to HouseKeeping, until control is returned
6
7
8
9
.....
return 0;
|