All pastes #1207476 Raw Edit

Anonymous

public text v1 · immutable
#1207476 ·published 2008-09-21 15:31 UTC
rendered paste body

   for ( heightCheck = 0; heightCheck < height; heightCheck++){


        int *row = malloc(sizeof(int)*width);
        if ( row == NULL ){
            perror ("Out of Memory");
            return;
        }

        int *column = malloc(sizeof(int) * height );
        if ( column == NULL){
            perror (" Out of Memory" );
            return;
        }


    /* Reads in the value of each pixel into a malloc'ed array */
        for ( i = 0; i < width ; i++ ){
            scanf("%d", &row[i]);
        }

        for ( i = 0; i < height; i++ ){
            column[i] =