I Think I found a solution:
By using memcpy after calloc and shmat and then freeing the memory area of calloc:
struct field_struct ** matrix;
matrix = (struct field_struct **)...
Type: Posts; User: alex_dhb
I Think I found a solution:
By using memcpy after calloc and shmat and then freeing the memory area of calloc:
struct field_struct ** matrix;
matrix = (struct field_struct **)...
Hi,
the reason why it did'nt work was the variable k...
void drawboard(char checkerboard[8][8])
{
int i,j,n;
for(n=0; n<9; n++)
Hi,
if you use "getch()" instead of "getchar()", it works :)
But in this case you have to include <conio.h>
Alex
hi,
matrix = (struct field_struct **) calloc(1,rows*sizeof(struct field_struct));
also works but
matrix = (struct field_struct **) calloc(1,rows*sizeof(struct field_struct *));
Hi,
I have to create a dynamic matrix with a number of rows and columns.
So i allocate memory for this with following code:
struct field_struct
{
float id;