Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Linux Programming, 4th Edition ISBN 978-0-470-14762-7
This is the forum to discuss the Wrox book Beginning Linux Programming, 4th Edition by Neil Matthew, Richard Stones; ISBN: 9780470147627
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Linux Programming, 4th Edition ISBN 978-0-470-14762-7 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old June 16th, 2014, 03:23 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default The CD application using DBM

The confusion is from book Beginning Linux Programming by Neil Mathew and Richard Stones.

In the book using DBM they have taught how to bulid a CD application to store CD data. They have used two structs one for storing CD catalog entry and one for storing CD tracks entry.The structs are as below:

Code:
/* The catalog table */
#define CAT_CAT_LEN 30
#define CAT_TITLE_LEN 70
#define CAT_TYPE_LEN 30
#define CAT_ARTIST_LEN 70

typedef struct {
char catalog[CAT_CAT_LEN + 1];
char title[CAT_TITLE_LEN + 1];
char type[CAT_TYPE_LEN + 1];
char artist[CAT_ARTIST_LEN + 1];
} cdc_entry;

/* The tracks table, one entry per track */
#define TRACK_CAT_LEN CAT_CAT_LEN
#define TRACK_TTEXT_LEN 70
typedef struct {
char catalog[TRACK_CAT_LEN + 1];
int track_no;
char track_txt[TRACK_TTEXT_LEN + 1];
} cdt_entry;
Not exactly getting what a:

char catalog[CAT_CAT_LEN];

is meant for in cdc_entry structure As i thought earlier user will type name of the album in that field but title is there for that. Then what catalog field is meant for actually not getting. What i think of various fileds can have is:

title = name of the album(Reckless)

type = is like genere (POP, ROCK, HIPHOP)

artist = who sang the song (Bryan adams)

catalog = ?(for what this field)

If anyone has been through this book and got what this field(catalog) should actually store.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need CD gemini9999 BOOK: Beginning Access VBA 0 November 29th, 2006 07:29 PM
Broken CD ajb963 BOOK: Beginning Access VBA 19 October 28th, 2006 08:07 PM
broken cd waz84792 Flash (all versions) 5 October 22nd, 2004 09:42 AM
CD-R and CD -RW info wwwdirzala Beginning VB 6 0 May 4th, 2004 05:00 AM



All times are GMT -4. The time now is 02:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.