Search:

Type: Posts; User: chriscolden

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Quick Sort

    by chriscolden
    Replies
    3
    Views
    1,947

    hey this has now been resolved. thanks :D

    hey this has now been resolved. thanks :D
  2. Replies
    8
    Views
    1,279

    nope its true, we have to make sure it runs on...

    nope its true, we have to make sure it runs on borland c 3.1 for dos as that is the only thing our university will use to teach us.

    i'm all for using better development enviroments, i think 1/2 of...
  3. Thread: Quick Sort

    by chriscolden
    Replies
    3
    Views
    1,947

    RESOLVED - Quick Sort

    Hi all,

    I have a quick sort function which i'm working on however, I am having problems with it. It seems to get stuck in a loop...when ever i break the program its on my comparison function. I...
  4. Replies
    8
    Views
    1,279

    thanks, sorted out all the errors. cheers

    thanks, sorted out all the errors. cheers
  5. well spotted, i hadn't noticed and nor did...

    well spotted, i hadn't noticed and nor did borland.

    the new line at the begining is just to drop it down so when it outputs in dos its not right at the top of the screen. other languages I like to...
  6. Replies
    8
    Views
    1,279

    Pointer Problems again

    hey,

    i have a pointer problem with my compare function.



    int dataComp( const void * a, const void * b ) {
    float * arg1, arg2;

    comps++;
  7. thanks for your help guys, I have sorted them...

    thanks for your help guys, I have sorted them problems and now encountered some more, I will try and work them out before posting again.

    cheers
  8. Thanks guys, I got it accepting the multi...

    Thanks guys,

    I got it accepting the multi lined string as far as i know but now its saying lvalue required



    void printHeader( FILE * filePointer ) {
    char buffer[500];

    buffer = "\n...
  9. Couple Of Questions I'm Absolutly Stuck On

    Hey,

    ok lets start with the one your going to find dead easy.

    i am trying to assign a string to this char array over multiple lines however I cannot work out the syntax


    char buffer[500];...
  10. Replies
    8
    Views
    1,814

    Hi thanks for all your help. I decided to go for...

    Hi thanks for all your help. I decided to go for an Insertion Sort. It was easier to code and will give me better results.

    Cheers
  11. Replies
    8
    Views
    1,814

    Ok i see what your saying but I should never have...

    Ok i see what your saying but I should never have to modify the head of the list as there is a dummy record sitting at the start. which is why when I first go into the first while loop I move it on...
  12. Replies
    8
    Views
    1,814

    UPDATE: I have changed modifing the pointers...

    UPDATE:

    I have changed modifing the pointers to simply moving the data between the two. This however had no effect. So i'm now more inclinded to say its the while loops its self.

    I have adapted...
  13. Replies
    8
    Views
    1,814

    ok new problem. i have the following code to...

    ok new problem.

    i have the following code to perform an exchange sort


    void sortRecords(RECORD * ptrDatabase, int * counter) {
    // Setup variables used within function
    char temp[5];...
  14. Replies
    8
    Views
    1,814

    sorry my bad this is working correctly. my...

    sorry my bad

    this is working correctly. my problem was because i forgot to re-terminate terminate the list after creating a new record.

    I'm sorry if i have wasted anyones time.

    Chris
  15. Replies
    8
    Views
    1,814

    Sorting Linked List Problem (Bubble... I Know)

    Hi all.

    Hopefully a simple answer but I just can't see it.

    I am trying to perform a simple exchange sort on a linked list.

    I have had the code working with a normal array but cannot seem to...
  16. Replies
    19
    Views
    3,700

    thanks for the tip. I have made the changes and...

    thanks for the tip. I have made the changes and all is still working fine.

    I have also changed the sizeof(RECORD) to sizeof(**ptrDatabase) as the faq surgested.

    Cheers again

    Chris
  17. Replies
    19
    Views
    3,700

    i won't hold my breath but i think, thanks to...

    i won't hold my breath but i think, thanks to everyones help here I have managed to get both of my memory functions to work correctly and the program to stop crashing on exit. I'll let you know if i...
  18. Replies
    19
    Views
    3,700

    int ReallocateMemory(RECORD ** ptrDatabase, int *...

    int ReallocateMemory(RECORD ** ptrDatabase, int * currentMemSize) {
    RECORD * ptrNew;

    ptrNew = (RECORD *) realloc(ptrDatabase, (*currentMemSize + memIncrease) * sizeof(RECORD));
    if (ptrNew ==...
  19. Replies
    19
    Views
    3,700

    i have got allocateMemory 2 return and set...

    i have got allocateMemory 2 return and set ptrDatabase. However I'm not sure how i would get reallocateMemory to work as Main calls createEntry which then in turn calls reallocateMemory. is there no...
  20. Replies
    19
    Views
    3,700

    I see what you mean by the NULL. Would this be...

    I see what you mean by the NULL. Would this be right now. I have modified the functions


    RECORD * ReallocateMemory(RECORD * ptrDatabase, int * currentMemSize) {
    RECORD * ptrNew;

    ptrNew =...
  21. Replies
    19
    Views
    3,700

    i do not understand. It doesn't need to return a...

    i do not understand. It doesn't need to return a valid pointer becuase i pass the address of the pointer into the function. Could i see some code relating to the modifications you recomend. Thanks
  22. Replies
    19
    Views
    3,700

    int saveDatabaseFile(RECORD *, char *, int *, int...

    int saveDatabaseFile(RECORD *, char *, int *, int *, int *);
    int loadDatabaseFile(RECORD *, char *, int *, int *, int *);

    int ReallocateMemory(RECORD *, int *);
    int AllocateMemory(RECORD *);
    ...
  23. Thread: Menu

    by chriscolden
    Replies
    8
    Views
    1,375

    strcpy will copy one string (array of chars) to...

    strcpy will copy one string (array of chars) to another string (array of chars).

    char * strcpy ( char * dest, const char * src );
    Copy string.

    Copies the content pointed by src to dest...
  24. Replies
    19
    Views
    3,700

    if not changes have been made the program...

    if not changes have been made the program crashes.

    if C is entered when changes have been made the program returns to the menu and does not crash.
  25. Replies
    19
    Views
    3,700

    i was just returning a value to exit the program....

    i was just returning a value to exit the program. thats how we have been told to do it. I'll change it to 0.
Results 1 to 25 of 32
Page 1 of 2 1 2