•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 402,025 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,415 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 690 | Replies: 2
![]() |
array[7] = array[8];
array[8] = array[9];And so on, but you'll probably want to use a loop.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
there's another solution a bit more complicated than the one from salem (wich is pretty simple, nonetheless pretty accurate to your question), but i'd rather create a temporary array, transer the files from array1[size] into array2[size], delete array1[size], create (again) array1[size-1], and transfer again all information, but the element you wish to remove.
This is pretty useful when you use large arrays and you wish to print them or use them in other processes (with a loop) that could/will use the entire array... this way, you have the amount of elements you need in your array, and you don“t have to worry about the last elements being the same...
This may also work when adding an element to the array, except that when you create the array again, the size must be [size+1], and then you read the information for the last element...
This is pretty useful when you use large arrays and you wish to print them or use them in other processes (with a loop) that could/will use the entire array... this way, you have the amount of elements you need in your array, and you don“t have to worry about the last elements being the same...
This may also work when adding an element to the array, except that when you create the array again, the size must be [size+1], and then you read the information for the last element...
Last edited by Nichito : Apr 27th, 2007 at 12:58 am.
-->sometimes i wanna take my toaster in a bath<-- ![]() |
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Removing an item from head of linked list (C)
- remove element (JavaScript / DHTML / AJAX)
- I need help removing Update.exe Spyware/Adware (Viruses, Spyware and other Nasties)
- appending and subtracting a number in an array (C++)
- linked stack question. (C)
- Removing Bridge.dll (Web Browsers)
- never taught how to show the VAT of a total. I know that u divide by 1.175 (Visual Basic 4 / 5 / 6)
Other Threads in the C Forum
- Previous Thread: Help with C programming problem
- Next Thread: Having problem generating Fibonacci sequence



Linear Mode