I have a Question about memory usage for C.
I am currently working on a Program for my C programming course in college, and i have a very important question that i need an answer to, so that i can decide how to implement my program. here's my question:
In C (not C++) i need to know what syntax (or code if you will) to create variables (nodes on a linked list) on the heap, instead of on the stack. I know that there is the NEW keyword to create these in C++ at least, but I don't think that NEW is a C keyword. now if NEW is a C keyword, then i will just use that (obviously) along with any of the keywords used for deleting the allocated items once i'm done with them, but if they aren't the keywords i need to know the code i'd need to know to create and destroy heap variables in C (or at least a point in the place to look for the syntax- but in that case it would have to someplace i could look within a day or 2 here- cause this is very time relevant.)
Any help would be very very very much appreciated, that or just a simple 'there is no way to create heap varaibles in C would do just fine- then i can just implement them on the stack like the rest of the inefficient mongrals < no offense to stack usage- just heap would be nicer and more efficient >
Now you are probably thinking- who cares if i use C++ syntax if i have a C/C++ compiler that will except it-- very good reason for it, it is a C class, so the instructor will very much frown upon C++ syntax in our programs- in fact they won't except it most likely... hence the dilema.
Any help, like i say, would be very much appreciated.