| Author |
Message |
bittware
Joined: 03 Apr 2004 Posts: 199 Helped: 1
|
27 Sep 2004 15:01 Basic C program question: If had defined global variable... |
|
|
|
Hello programming gurus,
If I had defined global variable in one .c file and in another .c file, a subroutine function also need use it. There are two approach to implement it.
1, use EXTERN reference
2, use function formal parameter
My question:
Do these two methods have essential difference?
Which approach is more reasonable?
Thanks in advance.
|
|
| Back to top |
|
 |
bittware
Joined: 03 Apr 2004 Posts: 199 Helped: 1
|
03 Oct 2004 14:48 Re: Basic C program question: If had defined global variable |
|
|
|
Anyone could give me some prompt?
|
|
| Back to top |
|
 |
stefanh
Joined: 21 Jan 2004 Posts: 7
|
03 Oct 2004 17:54 Re: Basic C program question: If had defined global variable |
|
|
|
| Maybe you should explain what a function formal parameter is. give an example.
|
|
| Back to top |
|
 |
otakung
Joined: 14 Jan 2003 Posts: 31
|
04 Oct 2004 2:16 Basic C program question: If had defined global variable... |
|
|
|
I don't sure I understand your question.
But it's very good if you have example or more information.
|
|
| Back to top |
|
 |