hello
my problem is the following : i have a Sandwich class which can contain a Vector of SandwichFillings. The SandwichFilling price is the same for any instance of this class so I figured it should be a static class member.
Now, in my application, I am adding instances of Sandwich to a Vector, and when I quit the application, the Vector is written to a file.
What I can't figure out is how to save the static class member, because what I am saving to a file is a Vector object. The idea is that if there is a price change for the SandwichFilling, then it is for all instances of this class.
hope I'm clear enough
thanks
paul
my problem is the following : i have a Sandwich class which can contain a Vector of SandwichFillings. The SandwichFilling price is the same for any instance of this class so I figured it should be a static class member.
Now, in my application, I am adding instances of Sandwich to a Vector, and when I quit the application, the Vector is written to a file.
What I can't figure out is how to save the static class member, because what I am saving to a file is a Vector object. The idea is that if there is a price change for the SandwichFilling, then it is for all instances of this class.
hope I'm clear enough
thanks
paul