奇怪的错误!是编译器的问题吗?
Linker Error] Unresolved external '_Form1' referenced from D:\BORLAND C++ BUILDER 6\PROJECTS\PROJECT2.OBJ[Linker Error] Unresolved external 'TForm1::' referenced from D:\BORLAND C++ BUILDER 6\PROJECTS\PROJECT2.OBJ
我用C FREE 可以编译出程序,但是用C++ BUILDER 却出现这样的错误,请问是为什么啊?
程序如下:
#include<iostream>
using namespace std;
const int len =66;
const int divs =6;
void subdivide(char ar[],int low,int high,int level);
int main()
{
char ruler[len];
int i;
for(i=1;i<len-2;i++)
ruler[i]=' ';
ruler[len-1]='\0';
int max =len -2;
int min =0;
ruler[min]=ruler[max]='|';
cout<<ruler<<"\n";
for(i=1;i<=divs;i++)
{
subdivide(ruler,min,max,i) ;
cout<<ruler<<"\n";
for(int j=1;j<len-2;j++)
ruler[j]=' ';
}
return 0;
}
void subdivide(char ar[],int low,int high,int level)
{
if (level==0)
return;
int mid=(high+low)/2;
ar[mid]='|';
subdivide(ar,low,mid,level-1);
subdivide(ar,mid,high,level-1);
}