Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   parsing text file with comma as a delimeter and then sorting. (http://www.go4expert.com/forums/parsing-text-file-comma-delimeter-t25631/)

rollyah 26Apr2011 15:00

parsing text file with comma as a delimeter and then sorting.
Hello, i'm working on an assignment for school. i'm doing in visual c++ using borland. i have a requirement to do the following: 1. Load Given a txt file which has a number of records (not specified) of student IDs and their date of enrollment. 2. Ability to filter Students by their ID 3. Ability to filter Students by Date of enrollment 4. Show the filtered result. Below is an example of one line of the mentioned text file: //Student ID, Date Enrolled,Name Abreviation 01368,2010-11-29,Ru88 What i've done so far: 1. Created visually the needed setup as such: i. ComboBox (contains Student IDs, which i've added manually) ii. DateTimePicker (added two with name: From and To) iii. RadioButton (Labeled as ALL records, DATEdResult( which will set the DATETimePIcker to enabled and visible to show a specific date) iV. StringGrid. v. main menu with open dialog. What i need advice with: 1. how can i load the text file in a way that i can take the comma as a delimiter. in other words, how can i sort by date (given that date is the second field. 3. am i correct to use stringgrid? would a memo be better suited for just showing the output? Thank you for you advice in advance.

All times are GMT +5.5. The time now is 07:34.