Cant solve this error... please help...

This is a discussion on Cant solve this error... please help... within the C++ Programming forums, part of the General Programming Boards category; Ok, I think im getting it now... im going to google this and read up on it more tho. thanks ...

  1. #16
    ------------
    Join Date
    Jun 2005
    Posts
    79
    Ok, I think im getting it now... im going to google this and read up on it more tho. thanks for the help everyone but theres 1 thing i dont get still... why does it do this?
    Code:
    int main() {
    	stats player;
    	player.life = 100;
    	player.debt = 500;
    
    	intro(player); //this... why is it player instead of stats &S?
    }
    is that defining player as stats &S when it gets passed to intro() ? is it like the structure is just getting handed from person to person and they can change the name?
    CAUTION: Newbie at programming!
    -------------------------------------------------
    Thanks everyone who helped me with all the questions, and utter lost-ness i happen to have... it is VERY VERY much appreciated

  2. #17
    *this
    Join Date
    Mar 2005
    Posts
    498
    You really should study basic functions and how they work.

    Check this out:
    http://www.mvhs.fuhsd.org/bob_vanhoy/pdfs/lesson07.pdf

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 04-25-2005, 12:59 PM
  2. help solve linking problem, thanks
    By Raison in forum Windows Programming
    Replies: 8
    Last Post: 05-29-2004, 12:14 PM
  3. ^^ help me solve the error
    By skwei81 in forum C++ Programming
    Replies: 2
    Last Post: 04-03-2003, 09:04 AM
  4. Help to solve this problem
    By Romashka in forum C++ Programming
    Replies: 3
    Last Post: 04-16-2002, 10:32 AM

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