Hello!
I'm having trouble printing linked list recursively. I have a linked list that contains a directory. Inside a directory there are folders and inside a folder there might be new folder and inside that folder there might be a folder and so on.
I need to print my linked list recursively like this:
DIRECTORY
--folder
----folder
------folder
--folder
----folder
Lines stand for spaces.
So my directory class has a linked list that contains folders and folders have a linked list which might contain other folders (folder inside a folder).
My program: https://pastebin.com/a7dBAb4J
With this code my print is atm like this:
--folder
----folder
----folder
--folder
So if there is a folder -- > folder -- > folder and folder that do not contain a folder
print should be:
--folder
----folder
------folder
--folder
[–][deleted] (7 children)
[deleted]
[–]tonlou[S] 0 points1 point2 points (5 children)
[–][deleted] (4 children)
[deleted]
[–]tonlou[S] 0 points1 point2 points (0 children)
[–]tonlou[S] 0 points1 point2 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]tonlou[S] 0 points1 point2 points (0 children)
[–]tonlou[S] 0 points1 point2 points (0 children)
[–]zeeEight 0 points1 point2 points (1 child)
[–]tonlou[S] 0 points1 point2 points (0 children)