Search Results

Showing results 1 to 3 of 3
Search took 0.00 seconds.
Search: Posts Made By: mmonaco27 ; Forum: C and child forums
Forum: C Dec 1st, 2007
Replies: 4
Views: 2,647
Posted By mmonaco27
This seems to work here, but when I actually apply it to my algorithm, it fails to sort.

#include <stdio.h>
#include <stdlib.h>

int main()
{
void *array = calloc(10, sizeof(int));

for...
Forum: C Dec 1st, 2007
Replies: 4
Views: 2,647
Posted By mmonaco27
I have a version where instead of manipulating the pointers, I keep track of the indices. Then when I want to reference one I simply add the index * size to the base of the array.

So yes, I can...
Forum: C Dec 1st, 2007
Replies: 4
Views: 2,647
Posted By mmonaco27
I'm implementing a heapsort on a void array. But I'm having trouble with line 6:
void siftdown(char *start, char *end, size_t size)
{
char *curr = start;
char *child;

while (curr*2 + size...
Showing results 1 to 3 of 3

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC