943,923 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 3248
  • C RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Sep 12th, 2009
0

Re: How to get length of array?

How do you make an array dynamically expandable?
Reputation Points: 18
Solved Threads: 15
Junior Poster
ivatanako is offline Offline
150 posts
since Jul 2007
Sep 12th, 2009
1

Re: How to get length of array?

Click to Expand / Collapse  Quote originally posted by ivatanako ...
How do you make an array dynamically expandable?
Using a 'normal' array this isn't possible in C, you could maybe try your hands on a linked list?
Reputation Points: 2125
Solved Threads: 243
Postaholic
tux4life is offline Offline
2,105 posts
since Feb 2009
Sep 12th, 2009
0

Re: How to get length of array?

The array sizeof thing only works when the definition of the array is in scope - that is, the compiler can see the actual array.

An array declaration, say
extern int array[ ];
or an array parameter
void foo ( int array[ ] );
needs a different approach.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: help sorting a text file
Next Thread in C Forum Timeline: count data types in c





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC