- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Ok so I am trying to write a piece of code that when a user inputs say "A = 'ls'" instead of outputting the files from the directory it will store the output in 'A'... If you get what i mean. SO say the directory /Desktop has stuff.txt and main.cpp … |
|
Ok i am trying to have the user give a directory via the command line (./a.out /usr/bin) and then output all the files in that directory. I don't really know how to approach this but here is what i have tried. [CODE]#include <iostream> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include … |
|
Ok so i have to print a table of data like so.. SURNAME LAST NAME ADDRESS POSTCODE right? but the problem is the text won't align to the appropriate heading. so when i try to use tabs if someone has a longer surname or whatever this happens. [CODE]SURNAME\t LAST NAME\t … |
|
Ok so i need to sort the data from a struct that has to be set out like so [CODE]struct Record { char name[30]; int age; int phone; double salary; }; [/CODE] Simple enough to fill the struct with the data from a file called records.txt but it isn't ordering. … |