Search:

Type: Posts; User: MstrKurt

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: Sorting Help

    by MstrKurt
    Replies
    5
    Views
    1,287

    How would I use qsort? I don't really understand...

    How would I use qsort? I don't really understand the structure of the code.
  2. Thread: Sorting Help

    by MstrKurt
    Replies
    5
    Views
    1,287

    Sorting Help

    Hey i'm in need of a little bit of explanation how I can sort the records I write to a .txt document.

    Here's my code:


    FILE *fp1; //Declare pointer
    ...
  3. Why am I wrong here?. EDIT: Or do you mean...

    Why am I wrong here?.

    EDIT:
    Or do you mean it's right to use == when using for example:

    if(1==x) and
    while(0==y)

    But isn't right to say
  4. Ok I have amended my code: #include...

    Ok I have amended my code:


    #include <stdio.h>
    #include <string.h>


    struct StockCtrl
    {
    int CatNum; // Declare Catalogue Number
  5. Thanks for that advice, I will do that now :).

    Thanks for that advice, I will do that now :).
  6. Ahhhh I see now. Thank you both for pointing that...

    Ahhhh I see now. Thank you both for pointing that out.
  7. I understand what you're saying, but you've got...

    I understand what you're saying, but you've got to remember that i'm looking for marks from what i've learnt currently.
    I'm not saying you're wrong, i'm sure you're not, but i'm just trying to pass...
  8. Thanks for the reply. I understand that not...

    Thanks for the reply.
    I understand that not everyone will agree with some of the code, maybe even all, but this is what i've been taught. Maybe at some later point I will be taught the difference...
  9. #include #include ...

    #include <stdio.h>
    #include <string.h>


    struct StockCtrl
    {
    int CatNum; // Declare Catalogue Number
    char title[20]; // Declare Book Title
    int Stock; // Declare Stock Number
    };
  10. Sorry for taking awhile. But I don't quite...

    Sorry for taking awhile. But I don't quite understand, I've got 5 items in my .txt folder, and a for loop that prints those files out in the console with i=0;i<5;i++
    If I put the number of records I...
  11. Need help with looping for reading external files!

    Ok, I'm using a variable called
    int loop_value=5;
    I've managed to change this to 6,7,8 etc when I add more records by using
    loop_value=loop_value+1;
    at the end of write to file so that the...
  12. Replies
    7
    Views
    1,460

    University says void main(). So whether it's...

    University says void main().
    So whether it's right or wrong, i'd be losing marks for int main().
  13. Replies
    7
    Views
    1,460

    What do you mean, "Fishy?". It's for a Uni...

    What do you mean, "Fishy?".

    It's for a Uni Assignment.

    What I am trying to do is return to the main menu (which is under void main()). I have made an If statement asking whether the user wants...
  14. Replies
    7
    Views
    1,460

    Return to main

    Hey guys, I was wondering what I would do to return to the main function.

    Say if I have a switch, and i've gone to switch 1, finished the business in switch 1 but now want to go to switch 3 or...
  15. Replies
    8
    Views
    3,810

    Just something my assignment requires is all.

    Just something my assignment requires is all.
  16. Replies
    8
    Views
    3,810

    I can't seem to manage to transform all my code...

    I can't seem to manage to transform all my code in to a flowchart, I think it's due to a lack of understanding of what shape means what. Can anybody help with this problem?.
  17. Replies
    7
    Views
    1,411

    Sorry I haven't replied. I have it sorted now....

    Sorry I haven't replied. I have it sorted now. Thanks for all the help :).
  18. Replies
    8
    Views
    3,810

    Is there a program that turns pseudocode in to a...

    Is there a program that turns pseudocode in to a flowchart?.
  19. Replies
    8
    Views
    3,810

    Ok thanks, what about when the user has to enter...

    Ok thanks, what about when the user has to enter what calculation to do?. There are 4 choices so is that a diamond with 4 arrows leading to other places?.
  20. Replies
    8
    Views
    3,810

    Flowchart help

    Hey, I was wondering if anybody could help me with flowchart development.

    I have a program that asks the user to enter 5 numbers but i'm unsure what shape in the flowchart that would come under?....
  21. Replies
    7
    Views
    1,411

    That's perfect, Thanks a lot :D. ____ I've...

    That's perfect, Thanks a lot :D.

    ____

    I've hit a snag by whatever i'm inputting, it's saying it has to be between the 2 values and exits, even if the numbers are between them. Code is:


    ...
  22. Replies
    7
    Views
    1,411

    End program through If statement?.

    Hey guys i'm wondering how I would end a program prematurely through an if statement if an invalid number is input.

    I thought something like this:


    int end=0;
    ...
  23. Replies
    13
    Views
    2,314

    Ok i've managed to fix it :) Thanks a lot for...

    Ok i've managed to fix it :) Thanks a lot for your help :). I've learnt a lot from just this one problem!.
  24. Replies
    13
    Views
    2,314

    Thank you for your help :) I have ammended the...

    Thank you for your help :) I have ammended the code as follows:

    for (n = 0; n < 5; n++) {
    if (max < valc[n])
    { max=valc[n];
    printf("Your largest number was:...
  25. Replies
    13
    Views
    2,314

    #include void main() { int...

    #include <stdio.h>

    void main()
    {
    int valc[5]; //valc = Value Count (Amount of Numbers Entered).
    int number; //Number for what calculation the user requests.
    float average; ...
Results 1 to 25 of 28
Page 1 of 2 1 2