文件包含 包不包括 包含c++源文件
为什么我包含了一个“**.cpp" 编译不通过啊?因为只看文件,所以简写了;
lianbao-jianli.cpp:
#include "lianbiao-insert.cpp"
#include <iostream>
using namespace std;
Student *creat_1();
void print(Student *head);
int main()
{
Student *p;
Student *head;
head=creat_1();
cout<<"intput :"<<"\t";
cin>>p->number>>p->score;
insert_1(head,p);
print(head);
return 0;
}
struct Student *creat_1()
{
...................
}
void print(Student *head)
{ .............}
lianbao-insert.cpp:
#include <iostream>
#include "l.h"
using namespace std;
Student *insert_1()
{....................}