Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I was wondering if anyone could help me with this, so I have asimple text file t

ID: 3610752 • Letter: I

Question

I was wondering if anyone could help me with this, so I have asimple text file that would contain something like this:
UID       PID   PPID TTY     STIME  COMMAND
     Ben   1760       1    con      17:30:02 /usr/bin/bash
     Ben   1676    1760 con    17:31:07   /usr/bin/ps

and I need to load this into a 2dimensional array so that I canlater look through the array and see how many UID's there are andhow many processes each one is running, the only problem is Ihonestly have no idea on how to do that, can anyone help me withthis, I've always had a problem with using file.

It can be done in either c or c++ w/e works best for you, andvectors or arrays will do fine but preferably arrays.



Explanation / Answer

please rate - thanks #include #include #include using namespace std; int main(){ string data[50][6],header; int i,j,count=0; ifstream input; input.open("input.txt");          //open file   if(input.fail())            //is it ok?        { coutdata[count][0]; while(input)     {     for(i=1;i>data[count][i];     count++;     input>>data[count][0]; } cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote