Recalling from an array/structure

This is a discussion on Recalling from an array/structure within the C++ Programming forums, part of the General Programming Boards category; Please can some one tell me how to display the inputted infomation that has been inputted into this vairiable i ...

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    2

    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
    Code:
    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!!!

    Code:
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    Maybe you should get together with all your other buddies on the same course - that way, you can all hand in the same homework.

    problem with function calling
    unknown error!
    Premature stoppage type thingy with tags

    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    2
    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.

    Thankyou

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, 06: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, 02:03 PM
  4. Array/Structure Bubble Sort
    By JKI in forum C++ Programming
    Replies: 3
    Last Post: 09-29-2003, 11:59 AM

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