Thread: C problem - Create a Personal Library

  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

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, 08: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