General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 21st, 2003, 03:24 PM
hotel_project hotel_project is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 17 hotel_project User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old July 21st, 2003, 03:37 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
  #3  
Old July 21st, 2003, 04:06 PM
hotel_project hotel_project is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 17 hotel_project User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old July 22nd, 2003, 08:18 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
  #5  
Old July 22nd, 2003, 03:38 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Defining Arrays"Urgent Request"


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT