Hello,
i wan to do c++ program in ubuntu that able to write a summary on the directory example is
drwx-x John 4096
d-w--x John 14
lrwx-x John 2300
How to i use array to put per column into array then access them so i can generate a report so it will be like this
Summary
Total directories = 2 ( the number of d in front determine it)
total link files = 1 ( the number of l in front determine it)
Name of user = John
Total size = 6410 (the total size of last column)
for now is i using char to determine the directories and link file
int main()
{
char input[100]
int directory = 0;
while(cin>>input)
{
if(input[0] == 'd')
directory++;
}
cout<<dir<<endl;
}
this is what i done to find the directories and link, but i cant use char method to grab name and calculate total size...anyone can tell me any method to generate the report...ty for all help