| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Take out dups in a list |
Hi Neil.
08-Jun-04 10:28:02, Neil Heller wrote to Jasen Betts
NH> JB>the second array gets {-1;0;0;0;} JB>(becaue you initialise it
NH> to all 0 in main) JB>but it's not immediately obvious wether the
NH> second element is a JB>number from the first list or marks the
NH> end...
NH> True. In thinking about that problem the only way (that I can
NH> see) to overcome it would be to dynamically create an array based
NH> on the size of the input data set OR do a linked list thing.
in C arrays don't have an intrinsic size, there's no way for a function to
determine the size of an array that was passed, (or returned) to it.
this is why you must tell things like qsort how big the array is.
-=> Bye <=-
---
* Origin: As King Arthur said: Some days it all seems so feudal. (3:640/1042)SEEN-BY: 633/267 270 @PATH: 640/1042 531 954 774/605 123/500 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.