Vector Storing
In a class I have to store and mantain a Vector object.
I can declare it as static, but anyway to access it I have to
initialize the Vector (new Vector()) ... so everytime I create a new
instance of this class I lose my data(??).
actual :
private static Vector dynvector;
in the constructor :
dynvector=new Vector;
dynvector.add(de);//add de to the end of the vector
What should I do to save the content of a vector ???
.
Relevant Pages
- Re: "no variable or argument declarations are necessary."
... the compilor will allert you ... If I forget to declare several variables in C, ... >> forget to initialize several variables in Python, ... > runtime error per "forgot to initialize". ... (comp.lang.python) - Re: Replicating results
... gradient calculation used in a large optimization routine. ... It will make sure that if you do something like declare a variable called "x1" and use a variable called "xl" the compiler will tell you that xl was undeclared. ... Make sure that you initialize all of your variables, ... (comp.lang.fortran) - Re: question on scope of a variable
... G'day "Chip Orange", ... If I have a std code module and declare at the top of it, ... >to be able to initialize it, or have access to it's value if it's ... >While this compiles for me, I'm getting a runtime error that indicates the ... (microsoft.public.word.vba.general) - Re: [Eclipse] How to fix indentations.
... Why do you declare the list static but initialize it in the ... the method that picks and displays the random fortune, ... The variable should be of the interface type, ... (comp.lang.java.help) - Re: how to create a record
... You can't declare anything in Ada in the scope where you declared it. ... I am not a big fan of the initialize everything in the record definition approach. ... You can still end up with code where you expect that some path puts some meaningful data into some field but it does not. ... (comp.lang.ada) |
|