Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by �ܽ�
Sun, 10 Oct 1999 00:00
Re: C������������
Author: �ܽ�
Date: Sun, 10 Oct 1999 00:00
Date: Sun, 10 Oct 1999 00:00
52 lines
1453 bytes
1453 bytes
> [1;36m==> Air_Jet(����) ˵��: [37;40m[0m
�ȽϹ淶��������
// globals.h
#ifndef GLOBALS
#define GLOBALS // ��ֹ�����γ���
#include <stdio.h> // ��<>����ָϵͳ��ͷ�ļ�
extern int i,j,k; //��ijһ���ļ��ж��壬����ֻ��������Щ����
extern void f1(void);
extern void f2(void);
#endif
// test.c
#include "globals.h" // ��""��ָ�Լ������ͷ�ļ�
int i,j,k; // ʵ�ʶ������
void main()
{
i = 1;
j = 2;
f1();
f2();
printf("%d\r\n",k);
}
// f1.c
#include "globals.h"
void f1(void)
{
k = i + j;
printf("%d\r\n",k);
}
// f2.c
#include "globals.h"
void f2(void)
{
k = i - j;
}
��UNIX�¿���д���µ�makefile
all:test
test:test.o f1.o f2.o
gcc -o test test.o f1.o f2.o
--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads