-
p=(struct student *)malloc(sizeof(struct student));
Don't use it that way, there's no such usage in C++...
If you want to use it, use p=new student...
C++ inside to open up space is to use new。。。
-
1.It is recommended to use a database to do it, and the workload will be much smaller.
2.If you don't need a database to do it, then store the address book in a file in a specific format, and a txt file is also fine. In this way, each time a linked list is appended or modified, it is appended or modified accordingly in the text file.
To do so, every time you open the program, just read the file and initialize your linked list. The challenge is how to organize the file structure effectively and how to parse it.
-
Please refer to this information management system based on the C language.
-
Hello! When is the program going to be?
-
Excuse me, the pnew variable in it represents a new node, right? Since the pnew variable in you is very messy, and you can't form a chain at all, you should first set a head node, the head node does not store data, and then link each node in turn, and use the malloc() function to apply for storage space. Alternatively, consider replacing the while() structure with a do-while structure.
Email if you have a problem:
-
This topic, yes, can help you.
-
Procedure**. Intent**Avatar number.
-
node* create(int n)
elseif (p)
p->next=head;
return head;
If you use next without an assignment to r, something will definitely go wrong.
Use more single-step debugging and learn to solve problems by yourself.
-
All the resources in the process are unified by the Qi Mining Section**.
Nothing exists.
Therefore, if the reputation of Sanmin Guo needs to be retained, it needs to be stored in peripherals.
-
The programs are all closed, how can there be "in the program"?
Heada and headb are both singly linked lists with leading nodes. In this algorithm, we delete the common elements from the ith element in the heada linked list, and then insert the single-linked list heada before the jth element of the headb. >>>More
1. The pointer of the last node points to a different point. >>>More
linklist reserve_fei(linklist l,int n)
What does n do. >>>More
Yahoo has full API documentation for Yahoo Weather Forecast's URL is: >>>More