c链表问题
#include <stdio.h>#include <stdlib.h>
#include <conio.h>
struct st
{
int num;
struct st *pnext ;
};
struct st *cratelist()
{
struct st *phead ;
phead=(struct st*) malloc (sizeof(struct st));
if (phead==NULL)
{
printf("output spack!");
}
else
{
phead->pnext=NULL;
}
return phead;
}
void main()
{
struct st *phead ,*cratelist;
phead=cratelist();
printf("%d ",phead);
getchar();
}
源代码如上,运行提示cratelist()函数不存在 沉了。
页:
[1]