Search:

Type: Posts; User: john_murphy69

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,740

    Better? #include #include...

    Better?


    #include <stdio.h>
    #include <ctype.h>
    #define SIZE 8 /* Size of board*/

    /* function prototype */
    void display(char board[] [SIZE]);
    int valid_moves(char board[] [SIZE], int...
  2. Replies
    7
    Views
    1,740

    Sorry is this better. #include ...

    Sorry is this better.




    #include <stdio.h>
    #include <ctype.h>
    #define SIZE 8 /* Size of board*/

    /* function prototype */
  3. Replies
    7
    Views
    1,740

    populating arrays

    I am new to C.

    I am trying to make sure that the rows and column adjacent to the row and column the user input are blocked( being populated by an 'X' behind the UI so a move can not be made there....
  4. Replies
    5
    Views
    3,679

    Thanks. That is good information. I will heed it.

    Thanks. That is good information. I will heed it.
  5. Replies
    5
    Views
    3,679

    never mind i figured it out

    never mind i figured it out. I always get the code tag wrong I put a \instead of a / in the [/code] tag
  6. Replies
    5
    Views
    3,679

    how to put char in board

    I am trying to take the values entered into the array and populate the display(board) function in those coordinates. I can't figure out how to populate the display with 'Q' in the correct...
  7. Replies
    3
    Views
    1,011

    OK. Thanks, I must have been asleep.

    OK. Thanks, I must have been asleep.
  8. Replies
    3
    Views
    1,011

    Char return value

    I am having y returned instead of the actuall char entered by the user. What am I doing wrong?


    #include <stdio.h>
    #include <ctype.h>
    #define SIZE 8 /* Size of board*/

    /* function prototype...
  9. Replies
    9
    Views
    1,367

    That is it you are correct. It is trying to...

    That is it you are correct. It is trying to access elements prior to the array and thefore nonexistent...memory error. Thanks.
  10. Replies
    9
    Views
    1,367

    I tried inverting with no success.

    I tried inverting with no success.
  11. Replies
    9
    Views
    1,367

    It could be inverted I have been on this for 5...

    It could be inverted I have been on this for 5 hours. I will try
    it the other way.
  12. Replies
    9
    Views
    1,367

    Fibonacci[i] += *(Fibonacci -2) + *(Fibonacci -...

    Fibonacci[i] += *(Fibonacci -2) + *(Fibonacci - 1) is supposed to get the numbers from the previous 2 elelments and add the to get the next number in the the array.
  13. Replies
    9
    Views
    1,367

    even with the declared array long Fibonacci[100]...

    even with the declared array long Fibonacci[100] i still get the memory error.
  14. Replies
    9
    Views
    1,367

    memory error

    I am getting a memory error whenever I input any other number than 5.
    It appears to be taking my static numbers but not generating the buffer I have created. Please help.







    #include...
  15. Replies
    2
    Views
    1,277

    Thanks, That is some damn good information. The...

    Thanks, That is some damn good information. The book I have does not cover these two questions.
  16. Replies
    2
    Views
    1,277

    clearthe buffer

    I am trying to clear the buffer with the while(getchar() != '\n') ; but it does not appear to be clearing. What am I doing wrong?





    #include <stdio.h>
    #include <string.h>
    #include...
  17. Thread: pointers

    by john_murphy69
    Replies
    2
    Views
    926

    pointers

    I keep getting an error when trying to assign my pointer to the arrays I have declared. The error is 'char *' differs in levels of indirection from 'char (*)[100]'. I am following the syntax in the...
  18. Replies
    10
    Views
    1,414

    Cool. Thanks for the help, the info. and the...

    Cool. Thanks for the help, the info. and the links.
  19. Replies
    10
    Views
    1,414

    That was it! It worked. Thanks. The information...

    That was it! It worked. Thanks. The information on the scanf leaving a newline character is interesting. Does this always occur in a scanf() or is it intermitent?
  20. Replies
    10
    Views
    1,414

    #include #include #include...

    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    #define str_length 100
    int main()
    {

    char str1[100];
    char str2[100];
    int count1;
  21. Replies
    10
    Views
    1,414

    It still doesnt work.

    It still doesnt work.
  22. Replies
    10
    Views
    1,414

    I had added printf() to do some debugging. This...

    I had added printf() to do some debugging. This is what I have without the debug printf().
    here is the whole code:
    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    #define str_length...
  23. Replies
    10
    Views
    1,414

    gets function

    I am haing a problem with the loop in my code.
    It works fine until the second iteration through the loop.
    When I make the loop into the code:

    printf("Please enter the first word\n");
    ...
  24. Replies
    11
    Views
    17,544

    Thank you.

    Thank you.
  25. Replies
    11
    Views
    17,544

    OK. When I enter that it does not work. Can you...

    OK. When I enter that it does not work. Can you look at my code.
    I problably have the syntax wrong.


    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    #define str_length 100
    void...
Results 1 to 25 of 42
Page 1 of 2 1 2