Search:

Type: Posts; User: hufnagel

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,388

    Oh my god! I got it:D Thank everyone for the...

    Oh my god! I got it:D Thank everyone for the help.
    I based my program off of a character counting sample our teacher gave us and I never quite understood it. Can anyone care to explain this code?
    ...
  2. Replies
    6
    Views
    1,388

    I think I messed up on what I was trying to say....

    I think I messed up on what I was trying to say. If I comment out that part, it will display every word in a text file correctly, but not counting each unique word.
    So, I think the while loop is...
  3. Replies
    6
    Views
    1,388

    Unique Word Counter

    I need help with an assignment. I am trying to make a program which reads a text file, separates the strings into words, then finally saving and counting each different word.

    When I comment out...
  4. Replies
    15
    Views
    1,773

    I've finally got it! Thank you so much for the...

    I've finally got it! Thank you so much for the help.
    There was roughly a 0.05 second difference between the normal one and the pointer one.
    Changed the j=a+1 to j=i+1. What a stupid mistake...
  5. Replies
    15
    Views
    1,773

    Here is my current code; #include ...

    Here is my current code;

    #include <stdio.h>
    #define MAX 20000
    #define RandMax 1000

    void select_sort(int a[], int n){
    int *i, *j, *min, t, *last;
    last=a+n;
    for(i=a; i<last; i++){
  6. Replies
    15
    Views
    1,773

    Use pointers to index 'rcgldr'. I'm kind of...

    Use pointers to index 'rcgldr'. I'm kind of confused. I tried to swap the elements instead of the pointers, but it's not doing any good...
  7. Replies
    15
    Views
    1,773

    Handling Arrays with Pointers

    I am trying to work on an assignment where I need to change the selection sort function code to use pointers to handle the arrays, so it takes less time for the program to run. (Using MSYS in Windows...
  8. Replies
    6
    Views
    2,568

    Oh, I've missed a simple typo. I've fixed it,...

    Oh, I've missed a simple typo.
    I've fixed it, but it still doesn't read correctly...
    I think the way I'm storing the strings are messed up.
    I've forgotten to put up the file I want to read:

    ...
  9. Replies
    6
    Views
    2,568

    'strcmp and strcpy' Not Working Correctly

    I'm trying to make program that will read text from a file and show what words occur how many times.
    I'm trying to make it so that if a new string comes, it saves it into wlist[], and counts 1 to...
  10. Replies
    6
    Views
    2,560

    This is what I'm trying to display: The top...

    This is what I'm trying to display:


    The top 3 sales for Jan is
    Ballpoint pen A 58
    Note C 46
    Note A 34
    The top 3 sales for Feb is
    [product name] [number sold]
    and so on for every month...
  11. Replies
    6
    Views
    2,560

    Sorting Two Dimensional Arrays

    I've made two C programs.
    The first program writes a binary table to 'sales.dat'.
    The second program is what I have a problem with.
    I want to sort those numbers in two ways by reading the binary...
Results 1 to 11 of 11