I am doing my assignment and would like to store all sub directories in the proc directory. One option is to use a file to store all and later store it back to a string like this.
system("ls -1 /proc | sort > hw4data.txt ");
myFile.open("hw4data.txt");
myFile >> fdata;
But I am not allowed to use an extra file. But I want the list of all subdirectories in the /proc directory.