Search:

Type: Posts; User: crazygopedder

Search: Search took 0.00 seconds.

  1. Replies
    12
    Views
    4,624

    WOW thank you so much :) I totally wasn't...

    WOW thank you so much :) I totally wasn't thinking about that null terminator lol.
  2. Replies
    12
    Views
    4,624

    Or maybe not...man I hate bugs like this. I've...

    Or maybe not...man I hate bugs like this. I've been through the program line by line, function by function, been through the whole algorithm...still can't figure out what's going wrong.
  3. Replies
    12
    Views
    4,624

    Maybe something was funky with the .txt file I...

    Maybe something was funky with the .txt file I was giving it. I made a new .txt file with just two words and now it works perfect.
  4. Replies
    12
    Views
    4,624

    Hmm I should've seen that. The game still acts...

    Hmm I should've seen that. The game still acts funny though. I changed the functions around a bit, but to no avail. For some reason the blank word string and the real word string aren't the same...
  5. Replies
    12
    Views
    4,624

    #include #include #include...

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

    #define MAXSIZE 30
    #define MAXWORDS 1000
    #define MAXINCORRECT 5

    char getGuess(int usedletters[26]);
  6. Replies
    12
    Views
    4,624

    Hangman game and strcmp

    I made a basic hangman game that reads in a text file with words, selects a random word, prints out the letters from the random word represented as underscores, asks the user what letter they guess,...
  7. I am forever indebted to you guys. Thanks for...

    I am forever indebted to you guys. Thanks for all your help. My program is now complete. I changed domove to this:



    int doMove(int puzzle[][PUZZLE_SIDE], int move)
    {
    int j = 0;
    ...
  8. Yea I know gets would be better but for this...

    Yea I know gets would be better but for this assignment it's not necessary. I'm still confused though. I know I need to swap the elements of the array, but like I said earlier we can't change the...
  9. Here let me post the whole program. You guys are...

    Here let me post the whole program. You guys are really helpful and I know I'm getting close to making this work, I appreciate it.



    #include <stdio.h>
    #include <time.h>

    #define...
  10. The for loops will find the number the user wants...

    The for loops will find the number the user wants to move. It's understood in the assignment that they enter a number that's actually in the puzzle. Just for kicks though I ran the program and...
  11. Yea exactly. How would I go about doing that...

    Yea exactly. How would I go about doing that though? The program is an assignment for class and we're not allowed to change the function prototypes.
  12. The puzzle again...Swapping elements of 2D array

    Ok, my puzzle program is almost complete. I just can't figure out how to swap the number the user chooses to put in the blank space, and the blank space.

    Here's the function that sees if the move...
  13. Replies
    11
    Views
    14,696

    Too quick to celebrate lol...I need a little bit...

    Too quick to celebrate lol...I need a little bit of help. The program loads random puzzles...sort of. If I run the program it loads/displays the 1st puzzle, then the 2nd, then the 3rd, then random...
  14. Replies
    11
    Views
    14,696

    YES! I was just about to post my code again but I...

    YES! I was just about to post my code again but I figured it out. I can now load/display random puzzles at will :) Muahahahaha. Still a long way to go on this prog but glad to be done with those...
  15. Replies
    11
    Views
    14,696

    I see what you mean there. I moved the...

    I see what you mean there. I moved the read-number-of-puzzles code to main, before the while loop for the game. I changed int puzzle[200][PUZZLE_SIDE]; to int puzzle[i][j]; and made necessary...
  16. Replies
    11
    Views
    14,696

    Is it something to do with the blank line in...

    Is it something to do with the blank line in between puzzles?
  17. Replies
    11
    Views
    14,696

    Ok, I arbitrarily declared puzzles as int...

    Ok, I arbitrarily declared puzzles as int puzzles[200][PUZZLE_SIDE]; but still the same problem, it only reads/prints the first puzzle. I can't make it read any other puzzle.
  18. Replies
    11
    Views
    14,696

    That's what I was thinking, but Dev-C++ won't let...

    That's what I was thinking, but Dev-C++ won't let me code it as int puzzle[][PUZZLE_SIDE];
    it says the array size is missing? I thought one could declare an array like this.
  19. Replies
    11
    Views
    14,696

    Here let me post the whole program. Maybe...

    Here let me post the whole program. Maybe there's a problem somewhere else? NOTE the program is just a scaffold at this point.




    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    ...
  20. Replies
    11
    Views
    14,696

    Anyone? I've searched the forums already and...

    Anyone? I've searched the forums already and found a similar problem but not the same. This shouldn't be all too complicated, it's just a 2D array of ints.
  21. Replies
    11
    Views
    14,696

    Read .txt file into 2D array.

    Ok, I am making a puzzle game. For my function loadPuzzle, I want to read in a random puzzle to a 2d array. The .txt file looks like this:

    3
    1 0 2 3
    5 6 7 4
    9 10 11 8
    13 14 15 12

    15 1 2 3...
  22. Thanks guys I figured it out now. Sometimes the...

    Thanks guys I figured it out now. Sometimes the simplest problems can be a real pain lol.
  23. Well I forgot to close the files ;/ but that was...

    Well I forgot to close the files ;/ but that was never the problem anyway. *Sigh* I know what you mean about fputc for every char, I just can't figure out how to implement it.
  24. It capitalizes every letter in the .txt file.

    It capitalizes every letter in the .txt file.
  25. Capitalize first letter of every word in .txt file

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

    int main(void)
    {
    FILE* fin;
    FILE* fout;
    char inputfname[256];
    char outputfname[256];
    char currentchar;
Results 1 to 25 of 25