[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:


I have a list of clients (name, adress, phone)and I want to have another list called bills (code, ammount). Each client may have more than one bill.How can I link them together, in a way that I can at anytime know how big is the debt of a client (in money) and how many bills he has( just by typing the name and the program shows me the list off bills)?
1 Solution
How about making a linked list of clients of structs like this:

struct client {
char name[NAME_SIZE];
char address[ADDRESS_SIZE];
/* add any other client info */
struct bill* bill_list; /* pointer to list */

and each client (using the bill_list pointer) has a list of bills of structs like this:

struct bill {
int ammount;
/* add any other bill info */
struct bill* next;

don't forget to have all the needed function to menage the lists (add, remove etc.)

This is a starting point from which you should be able to continue yourself.
If this is homework, we aren't supposed to help you but can give some guidenss.

Good luck,
Arnon David.
Have you thought about using QuickBooks?

Featured Post

Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now