- 论坛徽章:
- 0
|
头文件在这里。
#include<iostream.h>;
#include <stdio.h>;
#include<string.h>;
typedef char datetype;
typedef struct listnode{
datetype date;
struct listnode *next;
}listnode;
int creatlist()
{
char ch;
listnode *p;
listnode *r;
p=(listnode*)malloc(sizeof(listnode));
if(p=NULL)
cout<<"申请空间不成功"<<endl;
else return 1;
listnode *head;
head=(listnode*)malloc(sizeof(listnode));
if(head=NULL)
head=p;
else
cout<<"请输入连续字符:"<<endl;
cin>;>;ch;
while((ch=getchar())!='\n')
p->;date=ch;
p->;next=p;
r=p;
return 1;
}
cpp在这里呢。
#include<iostream.h>;
#include<string.h>;
#include"a.h"
int main(int arge,char *argv[])
{
int creatlist();
return 1;
} |
|