|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Defining Arrays"Urgent Request"
Hiiii everybody
Well I have a problem I want to know how to define more than one array but their size is dynamic which is a variable entered by the user.??? coz it works only for one array in my program and it doesn't work for other arrays. Thank you very much Bye |
|
#2
|
||||
|
||||
|
That's not a very helpful description of the problem. Why don't you tell us what you're trying to accomplish and then we'll go from there. It seems sort of odd to me that you'd have the user enter an array size. All arrays have dynamic sizes. You can push as many elements onto them as you wish, so size doesn't really matter.
|
|
#3
|
|||
|
|||
|
More Definition for Dynamic Array Problem
Well I need to simulate a networking system and I need so many arrays since each one will calculate and check specific thing , all of them should have the same size which is the number of stations...and that's why to simulate the system we need to make the number of stations as a variable since it affects the performance of the system...so that's why I need to assin this size to all other arrays and so the size for all of them should be dunamic...Hope that this is a good describtion that can let you help me in this problem...
Thank you soooooo much Bye Bye |
|
#4
|
||||
|
||||
|
I suppose you could initialize the arrays and use array_pad() to fill them out to the length specified by the user. I don't know why your current code works for only one array. I'd have to see code to have a shot at figuring that out.
|
|
#5
|
|||
|
|||
|
hotel,
You didn't even mention what programming language you are doing this in... You posted in the PHP/Python/C#/C++ forum. I could assume PHP as most posts are PHP related, however, you could easily be referring to c++. Please specify and try to be a little more clear. Thanks, ![]()
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Defining Arrays"Urgent Request" |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|