Search:

Type: Posts; User: DonFord81

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    3,530

    I just figured it out. The !isalpha line at...

    I just figured it out.

    The !isalpha line at the beginning of the code was ignoring all hyphens at the start of strings, so I wasn't even picking those up in the program.

    This has since been...
  2. Replies
    4
    Views
    3,530

    Variable not incrementing correctly.

    In this code, the integer "m" is supposed to be counting the number of times the program encounters a value less than zero (I'm measuring rainfall; -999.99 is "missing data"), while "n" is supposed...
  3. Replies
    5
    Views
    1,238

    Yes. I use "unnecessary" parentheses to keep...

    Yes. I use "unnecessary" parentheses to keep myself straight. Not for the program.

    At any rate, I've also noticed that when I increase LOWER to 5 and UPPER to 45, the array zeroes out as well,...
  4. Replies
    5
    Views
    1,238

    Iterations Gone Awry

    I'm currently in the process of writing a fairly complex program that iterates through a bit array, testing to see if certain combinations of bits are turned on or off. Up until I added the code for...
  5. Replies
    12
    Views
    9,836

    Does that mean I have to write a routine to have...

    Does that mean I have to write a routine to have the program figure out what "*.txt" means?
  6. Replies
    12
    Views
    9,836

    My main question is: if I use "*.txt" as argv[1],...

    My main question is: if I use "*.txt" as argv[1], will the program (when it functions correctly) go through all .txt files?
  7. Replies
    12
    Views
    9,836

    Incidentally, this is the first argc/argv program...

    Incidentally, this is the first argc/argv program I've written. It worked when I handled each file separately, so I think I got overconfident. *snicker*
  8. Replies
    12
    Views
    9,836

    cas was right. I've moved: double values =...

    cas was right. I've moved:


    double values = number_of_values;
    double y[number_of_values];


    right after the while loop, so it now reads:
  9. Replies
    12
    Views
    9,836

    Trying to use argv to access multiple files

    Ideally, I would like to be able to tell my program "autocorrelation *.txt" in a directory and have it process each file in the directory, returning each file's results to a new file ending in...
  10. Replies
    18
    Views
    3,031

    I still don't know what the program is doing...

    I still don't know what the program is doing wrong. I thought it might be something along the lines of having forgotten to run "make_matrix" after every instance of changing U_array, but I've...
  11. Replies
    18
    Views
    3,031

    The function that's probably missing for you is...

    The function that's probably missing for you is <combination.h>, which is not standard in the C library. I can include the code snippet I used for it, since I found it on an internet forum for such...
  12. Replies
    18
    Views
    3,031

    Anyone?

    Anyone?
  13. Replies
    18
    Views
    3,031

    Okay ... *sigh*... I've overhauled the program...

    Okay ... *sigh*...

    I've overhauled the program after writing out, in English, what I ideally want the program to do. Here's the "English" version of the program:



    zero all arrays;
    create...
  14. Replies
    18
    Views
    3,031

    You're right! That's a pretty big problem...

    You're right! That's a pretty big problem there...

    I'm dedicating today to finishing this. And after explaining what I actually want the program to be doing to my professor last night, I think...
  15. Replies
    18
    Views
    3,031

    Well, I changed the code, and in the interest of...

    Well, I changed the code, and in the interest of keeping my promise, I'm just re-posting to this note.



    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    #include <limits.h> /* for...
  16. Replies
    18
    Views
    3,031

    I feel stupid. I wasn't incrementing the matrix...

    I feel stupid. I wasn't incrementing the matrix if no solution was found...

    Back to the drawing board, I suppose.
  17. Replies
    18
    Views
    3,031

    Well, I moved combination.h so that it's in the...

    Well, I moved combination.h so that it's in the standard directory now.
  18. Replies
    18
    Views
    3,031

    Last Time with this Program ... I swear!

    Okay. I ran this program with MAX = 6, LOWER = 3, and it ran just fine. However, when I tried to bump LOWER up to 4 (and made all the appropriate hard-code changes), the program just loves to crash...
  19. Replies
    9
    Views
    4,716

    Including the "=" in "if (j > n)" solved the...

    Including the "=" in "if (j > n)" solved the problem with the matrix.

    My new question is: how would I go about using XOR? Wouldn't I have to make an entire array of 1's to do (bitarray ^ 1), or...
  20. Replies
    9
    Views
    4,716

    Thank you! I'll try them...

    Thank you! I'll try them...
  21. Replies
    9
    Views
    4,716

    I probably shouldn't have included the main...

    I probably shouldn't have included the main bitarray or main U_array, as they are not called in the test code.

    test_array is the test version of U_array, and test_matrix is the test version of...
  22. Replies
    9
    Views
    4,716

    The test_array only creates the "upper" or "U"...

    The test_array only creates the "upper" or "U" part of the matrix. The matrix itself should be symmetric along the diagonal (entry[i][j] == entry[j][i]), and since I want the diagonal to be all 1's,...
  23. Replies
    9
    Views
    4,716

    Bit Manipulation in Matrix

    Here's my code. It's supposed to take an array of bits (size MAX, whatever I want MAX to be) and arrange them into a MAX-by-MAX two-dimensional array for printing to screen. I can't tell which of...
  24. Replies
    11
    Views
    1,648

    That did it! Thanks!

    That did it! Thanks!
  25. Replies
    11
    Views
    1,648

    So, something more along the lines of this: ...

    So, something more along the lines of this:



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

    int main(int argc, char *argv[]){
Results 1 to 25 of 38
Page 1 of 2 1 2