Here first is the assignment I am having to complete.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
You should use either the C++ string object or C-String forthis problem. Read content from a file.
The file format is such that in each line: 1) there are three columns, and 2) each column is delimited
Output each line to stdout. The first column width should be 15, the second column width should be
8, and the third column width should be 6. If the line starts with a #, you should skip it. Moreover,
the second column should be displayed to 2 decimal places.
There might be more than 3 rows; you cannot assume only 3 rows. However, you can assume that
there are only 3 columns.
#Test file one
Sample output (output should be like this. Note extra line after first row only)
C1 c2 c4
Xyz 1.20 100
Abc 5.50 200
The problem I've run in to is that when I run it, nothing is printed out. I just get the bash commandline back and that's it. When I had line 28 reading "if(s == numSign" (the ASCII code for #), it spit out "#Test file one" and then had the rest of the sample input as one long line smooshed together. I'm not sure what exactly is wrong, I believe it to be the continue; command as I think that's breaking the entire while loop and not going back to the beginning.