Search:

Type: Posts; User: alex_dhb

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    2,848

    I Think I found a solution: By using memcpy...

    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 **)...
  2. Replies
    8
    Views
    1,813

    Hi, the reason why it did'nt work was the...

    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++)
  3. Replies
    4
    Views
    2,022

    Hi, if you use "getch()" instead of ...

    Hi,

    if you use "getch()" instead of "getchar()", it works :)
    But in this case you have to include <conio.h>

    Alex
  4. Replies
    3
    Views
    2,848

    hi, matrix = (struct field_struct **)...

    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 *));
  5. Replies
    3
    Views
    2,848

    calloc and shmget

    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;
Results 1 to 5 of 5