Search:

Type: Posts; User: mizzou222

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thanks for the help I used a pen and paper and...

    Thanks for the help I used a pen and paper and finally figured it out!!
  2. temp is exactly whats in strings, so I messed up...

    temp is exactly whats in strings, so I messed up because I am comparing the same strings. If I changed it to strings[i+1] would that work?
  3. Sorry this is just a small part of my program,...

    Sorry this is just a small part of my program, the other argvs are used for other functions like writing to output ect.
  4. Insertion sort in ascending order isnt working

    I am having trouble sorting out a list of names in c. I have code for sorting the names, but when I go to print them out they still are in the same order as they were at the beginning so something...
  5. Seg fault when reading file of names into an array

    I am having trouble reading in a file of 10 names into an array. Ive already allocated the memory, I just keep getting a seg fault when I try and read in the names. I must be doing something wrong,...
  6. Replies
    14
    Views
    1,508

    //Libraries #include...

    //Libraries
    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>


    #define MAX_NAME_LENGTH 20
    #define MAX_ARRAY_LENGTH 25
  7. Replies
    14
    Views
    1,508

    I actually get a seg fault at line 139, which is...

    I actually get a seg fault at line 139, which is the line
    "if (class[i].num_C != 0){"


    so now im really confused
  8. Replies
    14
    Views
    1,508

    thanks for the help, ill just ask my TA then if...

    thanks for the help, ill just ask my TA then if its the fscanf because they always mess that line up for us.
  9. Replies
    14
    Views
    1,508

    It compiles fine. But then I go to run the...

    It compiles fine. But then I go to run the program with the input file, and no output is displayed.
  10. Replies
    14
    Views
    1,508

    so instead of fopen(infile, "r"); I should put...

    so instead of fopen(infile, "r");
    I should put fopen("input.txt", "r"); ?

    I tried this and it doesnt work either
  11. Replies
    14
    Views
    1,508

    Error with my fopen statement

    When I go and compile my lab, I get this one error. If someone could tell me what I am doing wrong that would be awesome, because right now I am stuck. The error seems to be with my fopen statement,...
  12. Sorry, it just takes me forever to do these...

    Sorry, it just takes me forever to do these programs, I am not a computer science major and have never taken programming classes before, so I have to look a lot of stuff up online and it doesnt help...
  13. One second, I am figuring a bunch of them out

    One second, I am figuring a bunch of them out
  14. I get a lot of errors when I compile my code. It...

    I get a lot of errors when I compile my code. It is a big program, and I know you guys have a lot of things to do as well, so I'm not really that optimistic about getting a response, but ill post it...
  15. anyone?

    anyone?
  16. Hey, I finished that one function, so if you have...

    Hey, I finished that one function, so if you have time or if anyone else does could you look over it (I still have 1 func i need to do in the AM)? I'm extremely tired and am going to sleep, but will...
  17. Thanks I will. Im about to upload my full code

    Thanks I will. Im about to upload my full code
  18. How does this look for the infix_to_postfix...

    How does this look for the infix_to_postfix function?



    int i,a=0;
    char postfix[MAX_EQU_LEN];
    Stack list=create_stack();
    for(i=0;infix[i]!='\0';i++){
    if(!isOperator(infix,i)){
    ...
  19. I forgot to include this at the top of the code....

    I forgot to include this at the top of the code. Thanks for the help guys!!



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

    #define MAX_EQU_LEN 100
  20. Help with infix_to_postfix and evaluate_postfix functions.

    This is what my program is supposed to output.
    Sample Input
    (5 + 3)
    (3 * 8) /2
    5 % 4

    Sample output
    $ ./HW4 input.txt
    (5 + 3) = 8
    (3 * 8) / 2 = 12
  21. Replies
    2
    Views
    601

    never mind

    never mind
  22. Replies
    2
    Views
    601

    Program doesnt print out anything.

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    int partition( int a[], int l, int r ) {
    int i, t, q= l, p= l + (int) ( (r-l+1) * (double) rand() / (1.0 + (double) RAND_MAX) );
    ...
  23. Replies
    5
    Views
    912

    $ vim prelab11.c $ gcc -lm prelab11.c $ ./a.out...

    $ vim prelab11.c
    $ gcc -lm prelab11.c
    $ ./a.out
    10 10 25 60 75 90 100 150 200 300 500


    Heres a trial run. It printed out 2 10s instead of 1. Anyone have any idea why?
  24. Replies
    5
    Views
    912

    Whats that mean?

    Whats that mean?
  25. Replies
    5
    Views
    912

    Quick Sort and Parsing in C.

    void quick_sort(int* arr, int start, int end)
    Divide and conquer portion of quicksort, compare.

    int partition(int* arr, int start, int end)
    Choose a random pivot within the bounds of your...
Results 1 to 25 of 50
Page 1 of 2 1 2