C problem - Create a Personal Library

This is a discussion on C problem - Create a Personal Library within the C Programming forums, part of the General Programming Boards category; ok...what it is saying now is that there is a problem with the top line (highlighting in red)...

  1. #31
    Registered User
    Join Date
    Apr 2010
    Posts
    15
    ok...what it is saying now is that there is a problem with the top line
    (highlighting in red)

  2. #32
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    void printLib(struct lib *l ) {
    	int i;
    	for(i = 0;i < MAX_LENGTH;i++)
        printf("%s %s", myLib->collection[i]->author, myLib->collection[i]->title);
    	}
    }
    Count the number of { and } in this post.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #33
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Another change needs to be done in your searcher function.

    You want to search for a book in a given library. So you only need one book parameter and iterate through the library just like you did in the print function and compare the b.title book with myLib->collection[i].title to see if they are equal.

  4. #34
    Registered User
    Join Date
    Apr 2010
    Posts
    15
    Quote Originally Posted by quzah View Post
    Code:
    void printLib(struct lib *l ) {
    	int i;
    	for(i = 0;i < MAX_LENGTH;i++)
        printf("%s %s", myLib->collection[i]->author, myLib->collection[i]->title);
    	}
    }
    Count the number of { and } in this post.


    Quzah.
    yea took out the extra one

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 08-05-2010, 09:06 AM
  2. personal library
    By Aisthesis in forum C++ Programming
    Replies: 1
    Last Post: 03-02-2010, 07:47 PM
  3. Problem calling external method from within a shared library
    By Major Tom in forum C++ Programming
    Replies: 0
    Last Post: 04-21-2007, 09:14 AM
  4. Graphics.h library problem
    By ChronoSquare in forum C++ Programming
    Replies: 3
    Last Post: 05-01-2006, 09:18 AM
  5. Problem with Apache XML C++ Parser library
    By gandalf_bar in forum C++ Programming
    Replies: 2
    Last Post: 07-21-2004, 09:42 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21