男人下面两边老是痒:怎样用Borland C++Builder 6把4个C文件生成一个exe程序

来源:百度文库 编辑:高考问答 时间:2024/05/09 07:20:43
怎样用C++builder 6把 4个 C文件 生成 一个程序
main()
{extern enter_string(char str[80]);
extern delete_string(char str[],char ch);
extern print_string(char str[]); /* 以上3行声明要调用在其他文件的3个函数*/
char c;
char str[80];
enter_string(str);
scanf("%c",&c);
delete_string(str,c);
print_string(str);

}//为file1

#include<stdio.h>
entr_string(char str[80])
{gets(str);}//为file2

delete_string(char str[],char ch)
{int i,j;
for (i=j=0;str[i]!='\0';i++)
if(str[i]!=ch)
str[j++]=str[i];
str[j]='\0';
}//为file3

print_string(char str[])
{
printf("%s",str);
}//为file4
#include"C:\Documents and Settings\Administrator\桌面\1\File2.h"
#include"C:\Documents and Settings\Administrator\桌面\1\File3.h"
#include"C:\Documents and Settings\Administrator\桌面\1\File4.h"
我在Unit1.c 加了 但是生成的文件没有 想要的效果,程序什么都没有做

比如说你要在Unit1里面引用Unit2
那么就在#include "Unit1.h"后面添加#include "Unit2.h"
要引用几个就添加几个,然后一起编译就行了