且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

需要细分错误方面的帮助

更新时间:2023-11-20 12:53:04

'') { s =(链接列表)malloc(sizeof(List)); s->数据= c; s->下一个= l->下一个; //首先,s-> next从l-> next获取NULL值. l-> next = s; } 别的 { 休息; } } l = 1->下一个; while(l-> next!= NULL) { printf(%c",l-> data); l = 1->下一个; } return(false); }
'' ) { s = ( Linklist )malloc( sizeof( List ) ); s -> data = c; s -> next = l -> next; // First, s->next get the NULL value from l->next. l -> next = s; } else { break; } } l = l -> next; while( l -> next != NULL ) { printf( "%c", l -> data ); l = l -> next; } return( false ); }


Linklist l; //Uninitilazed pointer to List structure
Linklist l = (Linklist)malloc(sizeof(List));//Initialized pointer to List structure (heap)
List     l; //Initialized List structure (stack)


实际上,分段错误是内存错误.错误出现..pls一旦确认您的代码..
Hai actually Segmentation Fault is comming to Memory fault .. ur parametesr are not allocate memmory thet time its error is comming ..pls once ckeck ur code..