Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~881 People Reached
Favorite Forums
Favorite Tags
c++ x 7
Member Avatar for Samoht VII

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 …

Member Avatar for Salem
-1
174
Member Avatar for Samoht VII

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 …

Member Avatar for caut_baia
0
457
Member Avatar for Samoht VII

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 …

Member Avatar for corby
0
134
Member Avatar for Samoht VII

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. …

Member Avatar for jimmyrat
0
116