这个链表在书上有,为什么用编译器打出来确却是错的?
用的是VS2017,书上的一道程序题
int main()
{
struct st {
int n;
struct st*next;
}a = {5, &a[1],7,&[2],9,NULL},*p=&a;
return 0;
2018-06-10 10:56
2018-06-10 11:26
2018-06-10 15:23
~
程序代码:
#include<stdio.h>
int main( void )
{
struct st
{
int n;
struct st*next;
}a[] = {5, &a[1],7,&a[2],9,NULL},*p=a;
return 0;
}

2018-06-10 20:08