Hello,

(Visual Studio 6.0 - C++ : Console win32 application).

Can I declare an array which I don't know it's length on first time,
but I want to reference it as an array (not linked table with pre & next).

i.e :
double myLongArray[1000]
...
and suppose somewhere in the code - the size of myLongArray is 1002 -
can I change its size on runtime ?

Thanks :)

Re: dynamic array by Peter

Peter
Sat May 07 08:22:41 CDT 2005


"John M" <nobody@nospam_please.com> skrev i en meddelelse
news:%23vDytPwUFHA.1404@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> (Visual Studio 6.0 - C++ : Console win32 application).
>
> Can I declare an array which I don't know it's length on first time,
> but I want to reference it as an array (not linked table with pre & next).
>
> i.e :
> double myLongArray[1000]
> ...
> and suppose somewhere in the code - the size of myLongArray is 1002 -
> can I change its size on runtime ?
>
> Thanks :)
>

You're not shy - are you? Six posts on one day is quite a lot. Spend some
time solving the problems for yourself instead of flooding this newsgroup.

/Peter

P.S. Look at std::vector



Re: dynamic array by Mike

Mike
Sat May 07 10:03:58 CDT 2005

"John M" <nobody@nospam_please.com> wrote in message
news:#vDytPwUFHA.1404@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> (Visual Studio 6.0 - C++ : Console win32 application).
>
> Can I declare an array which I don't know it's length on first time,
> but I want to reference it as an array (not linked table with pre & next).
>
> i.e :
> double myLongArray[1000]
> ...
> and suppose somewhere in the code - the size of myLongArray is 1002 -
> can I change its size on runtime ?
>
> Thanks :)
>
>

And good luck with your homework assignment.