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...
Type: Posts; User: john_murphy69
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...
Sorry is this better.
#include <stdio.h>
#include <ctype.h>
#define SIZE 8 /* Size of board*/
/* function prototype */
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....
Thanks. That is good information. I will heed it.
never mind i figured it out. I always get the code tag wrong I put a \instead of a / in the [/code] tag
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...
OK. Thanks, I must have been asleep.
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...
That is it you are correct. It is trying to access elements prior to the array and thefore nonexistent...memory error. Thanks.
I tried inverting with no success.
It could be inverted I have been on this for 5 hours. I will try
it the other way.
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.
even with the declared array long Fibonacci[100] i still get the 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...
Thanks, That is some damn good information. The book I have does not cover these two questions.
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...
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...
Cool. Thanks for the help, the info. and the links.
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?
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#define str_length 100
int main()
{
char str1[100];
char str2[100];
int count1;
It still doesnt work.
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...
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");
...
Thank 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...