Hi i just started learning C++ couple of weeks ago. So now I have this school assignment problem that asks me to implement a linked-list without using "new" or anything to do with dynamically allocating memory (and cannot use any ADT from STL). The prof says that everything can be done on the stack, but how? I have been working on this since friday and still stuck on this with absolutely no luck.
It says: Keep a stack of the file names being read. Use the following data structure for the stack:
struct Node {
string fileName;
Node *link;
};
I tried to avoid using new but it always give me "segmentation fault" or "BUS error" when i pass the head of the list into a recursive method call. Any ideas about how i can work around this??
Thanks very much for any input.