473,394 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Please Help! Dynamic Allocation of array of structures

Does anyone know how to dynamically allocate array of structures? Or where
Ican find info on this on the web? John
Nov 20 '05 #1
5 1540
On 2004-01-23, RBCC <pu************@email.com> wrote:
Does anyone know how to dynamically allocate array of structures? Or where
Ican find info on this on the web? John


Check out ReDim...

--
Tom Shelton [MVP]
Nov 20 '05 #2
On 2004-01-23, RBCC <pu************@email.com> wrote:
Does anyone know how to dynamically allocate array of structures? Or where
Ican find info on this on the web? John

Oh, or better yet - if possible - change your structures to classes and
use an ArrayList...

--
Tom Shelton [MVP]
Nov 20 '05 #3
* RBCC <pu************@email.com> scripsit:
Does anyone know how to dynamically allocate array of structures? Or where
Ican find info on this on the web? John


'ReDim Preserve'...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
why classes? when a struct will do

jc

"Tom Shelton" <to*@mtogden.com> wrote in message
news:eE**************@tk2msftngp13.phx.gbl...
On 2004-01-23, RBCC <pu************@email.com> wrote:
Does anyone know how to dynamically allocate array of structures? Or where Ican find info on this on the web? John

Oh, or better yet - if possible - change your structures to classes and
use an ArrayList...

--
Tom Shelton [MVP]

Nov 20 '05 #5
Jose,
Because structs will be boxed when you put them into an ArrayList, making it
slightly more difficult to update them.

Classes will not be boxed when they are put into the ArrayList as they are
already reference types, so they are easier to work within an ArrayList.

Remember that an ArrayList is designed to hold Objects (reference types).

Hope this helps
Jay

"Jose Caliente" <jc@noble.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
why classes? when a struct will do

jc

"Tom Shelton" <to*@mtogden.com> wrote in message
news:eE**************@tk2msftngp13.phx.gbl...
On 2004-01-23, RBCC <pu************@email.com> wrote:
Does anyone know how to dynamically allocate array of structures? Or where Ican find info on this on the web? John

Oh, or better yet - if possible - change your structures to classes and
use an ArrayList...

--
Tom Shelton [MVP]


Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql,...
2
by: m3ckon | last post by:
Hi there, had to rush some sql and am now going back to it due to a slow db performance. I have a db for sales leads and have created 3 views based on the data I need to produce. However one...
6
by: James Walker | last post by:
Can some one help I get an error of 'checkIndate' is null or not an object can someone please help. I can't work out why Thanks in advance James <form> <td height="24" colspan="7"...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
7
by: Alan Bashy | last post by:
Please, guys, In need help with this. It is due in the next week. Please, help me to implement the functions in this programm especially the first three constructor. I need them guys. Please, help...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
13
by: Joner | last post by:
Hello, I'm having trouble with a little programme of mine where I connect to an access database. It seems to connect fine, and disconnect fine, but then after it won't reconnect, I get the error...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
0
by: 2Barter.net | last post by:
newsmail@reuters.uk.ed10.net Fwd: Money for New Orleans, AL & GA Inbox Reply Reply to all Forward Print Add 2Barter.net to Contacts list Delete this message Report phishing Show original
5
by: tabani | last post by:
I wrote the program and its not giving me correct answer can any one help me with that please and specify my mistake please it will be highly appreciable... The error arrives from option 'a' it asks...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.