阅读背景:

使用C中的数组实现链接列表时的Segfault

来源:互联网 

Alrighty, first off, I am 100% positive that it is not my print function that is messing up this program, but my output is printing "pre" and then segfaulting. I believe that it's happening within my create_list function. My logic in that function is that the array (the linked-list typedef is Node, so head is Node*, the array that holds the heads is Node**) holds the heads of several different linked-lists, and stores each branch according to the index (first number in the input). But obviously my logic in programming isn't equal to what I'm thinking. Any assistance would be great, thanks.Alrighty, first off, I am 100% positive that it




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: