I am working on basic linked list and I have just writen a program on Adding and multiplying polynomials. Unfortunately, I there's some problem with the memory...or may be my functions. Can you figure out my mistake and give me an advise or how to fix it?. Thanks
( heso = coefficent, somu = exponent)
There are a number of problems with your design. A linked list is not a polynomial, nor is a polynomial a linked list. The logic for the two should be separate. There is not a single delete in your code, although there are plenty of news.
But, your most immediate problem is that polynomialinput doesn't do anything but let the user enter some numbers that are promptly discarded.
As to the design: redesign. (This is not strictly necessary. You can make your poor design work, but it will still be poorly designed.)
As to not deleting what you new: do so. (Also not strictly necessary. You can pretend your resources are unlimited, but it's not a very good idea to do so.)
As to polynomialinput not doing what it should, make it do what it should. (Entirely necessary.)