Complete.Org: Mailing Lists: Archives: discussion: October 1998:
Re: [aclug-L] C++ ideas...
Home

Re: [aclug-L] C++ ideas...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: Re: [aclug-L] C++ ideas...
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: 21 Oct 1998 01:01:09 -0500
Reply-to: aclug-L@xxxxxxxxxxxx

Jesse Kaufman <kaufmjes@xxxxxxxxxxxxxxxxx> writes:

> ok, after seeing the last few posts on c++, i think this post isn't too
> far off the topic of linux...

Not a problem!

> first, some history... well, i'm a beginning c++ programmer (ie: i'm
> halfway thru my first c++ course at Tabor), and i'm wanting to create my
> own program...  an mp3 lister.  i think i will start out inputting a
> pre-created text file as an array of strings, then manipulating it (ie
> adding a header, footer, and maybe cleaning it up a bit)...  eventually,
> i'd like to be able to put in the directory i want to make a list of,
> then save the results to a file...
> 
> any ideas?  tips?  comments?  help?

You'll want to use the opendir() and readdir() functions to read
directories.

Despite what you may be told, C's printf is still, in my opinion, the
easiest way to produce neatly-formatted output in C++.

^L (\f, if I remember correctly) is a formfeed character.  The printed 
page is 66 lines; the screen is 24 lines.

Watch out with arrays; if you get more data than you expect, your
program will crash.  You may want to use a linked list instead.  Or,
better yet, read in one item at a time and output the results as you
read them in.

> i assume there's already programs out there to do this, but i'd like the
> experience...and to be able to say it is mine! : ^ )

Are ya gonna GPL it? :-)

-- 
John Goerzen   Linux, Unix consulting & programming   jgoerzen@xxxxxxxxxxxx |
Developer, Debian GNU/Linux (Free powerful OS upgrade)       www.debian.org |
----------------------------------------------------------------------------+
Visit the Air Capital Linux Users Group on the web at http://www.aclug.org
---
This is the Air Capitol Linux Users Group discussion list.  If you
want to unsubscribe, send the word "unsubscribe" to
aclug-L-request@xxxxxxxxxxxx.  If you want to post to the list, send your
message to aclug-L@xxxxxxxxxxxx.



[Prev in Thread] Current Thread [Next in Thread]