Hello,

How can I create an array of structure ? the struct will be holding the
results of a query. any link or example ?


Thanks,
Smith

Re: array of struct by lallous

lallous
Wed Sep 29 01:29:17 CDT 2004

Hello

You can use dynamic arrays using new [] /delete [].
You can also use vectors as: std::vector<mystruct> lst;

HTH,
Elias
"ramsin" <jsmithmitra@yahoo.com> wrote in message
news:ec6LtkepEHA.3728@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> How can I create an array of structure ? the struct will be holding the
> results of a query. any link or example ?
>
>
> Thanks,
> Smith



Re: array of struct by James

James
Wed Sep 29 14:38:37 CDT 2004

// Given:
struct MyStruct {......};

//Simple Array
MyStruct mystructarray[100];

// Dynamic array
MyStruct *pMystructarray = new MyStruct[N];

// vector
std::vector<MyStruct> vecMystruct;

--
Truth,
James Curran
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
(note new day job!)
"ramsin" <jsmithmitra@yahoo.com> wrote in message
news:ec6LtkepEHA.3728@TK2MSFTNGP09.phx.gbl...
> Hello,
>
> How can I create an array of structure ? the struct will be holding the
> results of a query. any link or example ?
>
>
> Thanks,
> Smith
>
>