Re: vector::iterator usage help needed
From: Val (valmont_programming_at_hotmail.com)
Date: 05/14/04
- Next message: Val: "Re: Little console input problems"
- Previous message: Francis Glassborow: "Re: objects as parameters"
- In reply to: Ulrich Eckhardt: "Re: vector::iterator usage help needed"
- Next in thread: Ulrich Eckhardt: "Re: vector::iterator usage help needed"
- Reply: Ulrich Eckhardt: "Re: vector::iterator usage help needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 May 2004 11:34:11 +0200
Thank you sir.
Good you mentioned getDeck() returns a temporary, because I have another question, most likely related to your remark:
I may want to swap "cards" in my "deck" but doing it with the getDeck method doesn't work. Nevertheless I would like to swap various
indexes with eachother sooner or later.
How would I do that?
I don't want to add a public interface in class Deck so I can access it from another class. Seems bad design to me, but I might be
wrong since I am wrong easely when it comes to OO.
So how can I do that? Surely I can't return a vector (vector<Card>) by reference in the Deck class can I? Would that be clever to
start with?
Thanks you again,
Val
- Next message: Val: "Re: Little console input problems"
- Previous message: Francis Glassborow: "Re: objects as parameters"
- In reply to: Ulrich Eckhardt: "Re: vector::iterator usage help needed"
- Next in thread: Ulrich Eckhardt: "Re: vector::iterator usage help needed"
- Reply: Ulrich Eckhardt: "Re: vector::iterator usage help needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|