From: "Brian" Newsgroups: comp.os.msdos.djgpp Subject: Add text file to allegro's listbox? Lines: 28 X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Message-ID: <3Wuk4.2280$4f5.498356@tw12.nn.bcandid.com> NNTP-Posting-Host: 216.54.139.2 X-Trace: tw12.nn.bcandid.com 949123839 216.54.139.2 (Fri, 28 Jan 2000 22:30:39 MST) NNTP-Posting-Date: Fri, 28 Jan 2000 22:30:39 MST Organization: bCandid - Powering the world's discussions - http://bCandid.com Date: Sat, 29 Jan 2000 05:30:39 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I want to add strings in a text file to Allegro's listbox. The text file is in a simple format where the carriage returns will be what seperates each entry in the listbox: This is String1 This is String2 This is String3 ...etc. I just started working with file I/O so don't expect my code to make sense. This code below is as far as I can get. How do I print the strings into the listbox? static char *strings[] = { char *buffer filesize = getFileSize("playlist.dat"); buffer = (char *)malloc(filesize); char *fgets(buffer, EOF, "playlist.dat"); }; Thanks, Brian