Problem initializing 1-d array with vector.size()

Hi

While having a vector

[code]int code(){
vector values_;
values_.clear();

for (int t=0;t<10;t++)values_.push_back(sin(3*3.14/float(t)));

double contents[values_.size()];
}

[/code]
I get this

[quote]
Error: Non-static-const variable in array dimension code.C:7:
(cint allows this only in interactive command and special form macro which
is special extension. It is not allowed in source code. Please ignore
subsequent errors.)
Error: non class,struct,union object values_ used with . or -> code.C:7:
*** Interpreter error recovered ***[/quote]

Looks like does not like to assign the values_size() for the initialization of the 1-d array…How can I fix it ?

Thanks

Alex

double *contents = new double[(values_.size())]; // ... delete[] contents;

Thanks!

.