c - creating a struct for file/directory tree -
how 1 go creating struct file/directory tree. c program gets txt file input shell scripts of paths of each txt file. example
a\a1.txt a\m\m1.txt
how create struct this?
maybe
for simple 1 dimensional string of strings
struct mypath { char *element; // pointer string of 1 part. mypath *next; // pointer next part - null if none. }
for full binary tree representation
struct node { char *element; // pointer string - node. node *left; // pointer left subtree. node *right; // pointer right subtree. }
Comments
Post a Comment