March 3rd, 2013, 04:04 PM
-
C Programming HW Help
Hey all. I'm new to this forum and also to C. This homework is killing me, I have no idea how I should start it. Essentially, I have to read a text file whose input file has a list of these:
1301,204415019,"LastName","FirstName",EEE, 230,="R01"
and categorize them into their respective columns, sorted by name. I have to put the info from the file into an array of structs and output the data in a table format. I need to use two or more source files and a makefile.
The problem here is that I've just learned about all these things and I don't really know what the general process should be like. Some tips and pointers would be cool.
March 4th, 2013, 04:16 PM
-
Please post an effort, even if it's an outline of an algorithm.
LOAD DATA:
while there's more in the file
-read line
-parse line
-store the parse result into an array
SORT:
qsort(correct,arguments)
DISPLAY:
for each record
-show it
Makefile
override CFLAGS += -Wall -g
hw1: hw1.c hw.h
[code]
Code tags[/code] are essential for python code and Makefiles!
March 4th, 2013, 06:05 PM
-
I finished your homework. You want a peudocode of it?
March 5th, 2013, 09:00 AM
-
Sure
As long as its the general idea sure. As much as I would love a straight up answer, I can't accept it. My pride won't let me haha. If your code is pseudo as you say, I would much apreciate it.