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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -