Thread: Recalling from an array/structure

  1. #1
    Registered User
    Join Date
    May 2004

    Recalling from an array/structure

    Please can some one tell me how to display the inputted infomation that has been inputted into this vairiable

    i use this to input a valu/char to the vaiable
    void books::enter(int i) {
     cout << "Enter the name of the book ";
    cin >>(np[i].title);
    (;'s may bo over top ?? but it's ok im still learning)

    and than in my main run some functions in sequence
    i have tried this to display the inputted vale but nothing im stuck please help!!!

    void books::list(void){
    int i;
    	cout << "Listing.." ;
    	for (i=0;i<2;i++) {
    	  cout << "\ntitle "; cout << (np[i].title) ;

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Maybe you should get together with all your other buddies on the same course - that way, you can all hand in the same homework.

    Shouldn't be too hard, you all have the same IP address.

    Hell, you're all doing the same library management code, right down to using the same variable names for things. Makes me think this is the standard template handed out by your tutor for you to finish.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    May 2004
    Yes we are all doing the same peice of coursework, and we are also sharing an internet connection - but we are not giving code to eachother as that is collusion and therefore isnt really a good idea.

    There are however problems that we come across which none of us know the answer to, which is why we decided to use this message board - because in the past it greatly helped one of us (Andystudent) and he recomended it to the rest of us due to the help he recieved.

    So if you could help with my problem it would be appreciated.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recalling code meaning
    By fragma757 in forum C Programming
    Replies: 3
    Last Post: 03-25-2006, 07:35 PM
  2. recalling data
    By Warhawk in forum C++ Programming
    Replies: 22
    Last Post: 09-29-2005, 09:00 AM
  3. Recalling Functions?
    By suzumebachi in forum C++ Programming
    Replies: 15
    Last Post: 02-14-2005, 03:03 PM
  4. Array/Structure Bubble Sort
    By JKI in forum C++ Programming
    Replies: 3
    Last Post: 09-29-2003, 11:59 AM