🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #239

Re: C������������

#239
From: Rodge
Date: Sun, 10 Oct 1999 00:00
56 lines
1833 bytes
> ==> Air_Jet(����)                            ˵��: 
>   ������һ�������ⲿ����ij������� 
> ��дһ������������ӳ������õ����� 
> ��ͷ�ļ���ȫ�ֱ�����ͷ�ļ�(Globals.h) 
> �����������ļ��У������ⲿ������ļ� 
> ��Ͳ��ٰ���Ӧ�����ݡ� 
>    
>   �ʣ�Ӧ�����д������Ŀ�ͷ����ʹ���� 
> ͨ����ֺ���δ�������ظ�����Ĵ��󣩣� 

add HEADER FILE PROTECTION:

#ifndef ******
#define ******

...
..

#endif


> �� 
>   ������Ϊ test.c 
>   ͷ�ļ�Ϊ globals.h 
>   �ӳ���ֱ�Ϊ��function1.c, function2.c,... 
> //test.c�����ݣ� 
> #include "globals.h" 
> extern void f1(void); 
> extern void f2(void); 
> void main(void) 
> { 
>    i = 1; 
>    j = 2; 
>    f1(); 
>    f2(); 
>    printf("%d\r\n",k); 
> } 
> //globals.h������: 
> #include "stdio.h" 
> extern int i, j, k; 
>   
> //function1.c�����ݣ� 
> void f1(void) 
> { 
>    k = i + j; 
>    printf("%d\r\n",k); 
> } 
> //function2.c�����ݣ� 
> void f2(void) 
> { 
>    k = i - j; 
> } 
 

--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Technical Details
Message-ID: <991010.11a91j$PBBS@bbs.ustc.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: fc86e,e47664455b8e7def
X-Google-Attributes: gidfc86e,public
From: Roger_Lee@bbs.ustc.edu.cn (Rodge)
Subject: Re: C������������
Date: 1999/10/10
Message-ID: <991010.11a91j$PBBS@bbs.ustc.edu.cn>
X-Deja-AN: 536367843
Distribution: ustc
Organization: �й�ƴ�BBSվ
Newsgroups: cn.bbs.comp.program