Results 1 to 30 of 65

Hybrid View

  1. Collapse Details
     
    #1
    autumn dragon reno's Avatar
    Join Date
    Dec 2011
    Location
    co-op cock torture
    Posts
    830
    pixel_t *pix = (pixel_t *) malloc(sizeof(pixel_t) * Width * Height);

    int counter1 = 0, counter2;

    for(;counter1<306;counter1++){
    for(counter2 = 0;counter2<204;counter2++){
    pix[counter1][counter2]->r = fgetc(tiger);
    pix[counter1][counter2]->g = fgetc(tiger);
    pix[counter1][counter2]->b = fgetc(tiger);
    fprintf(stdout, "%c %c %c", pix[counter1][counter2]->r, pix[counter1][counter2]->g, pix[counter1][counter2]->b);
    }
    }

    mainDriver.c:57:17: error: subscripted value is neither array nor pointer nor vector
    mainDriver.c:58:17: error: subscripted value is neither array nor pointer nor vector
    mainDriver.c:59:17: error: subscripted value is neither array nor pointer nor vector
    disappointing you is getting me down



    Reply With Quote
     

  2. Collapse Details
     
    #2
    ส็็็็็็็็็็็็ส็็็็็็ ็็็็็ Autistic Spectrum's Avatar
    Join Date
    Dec 1969
    Location
    ส็็็็็็็็็็็็ส&#
    Posts
    50,841
    Quote Originally Posted by reno View Post
    pixel_t *pix = (pixel_t *) malloc(sizeof(pixel_t) * Width * Height);

    int counter1 = 0, counter2;

    for(;counter1<306;counter1++){
    for(counter2 = 0;counter2<204;counter2++){
    pix[counter1][counter2]->r = fgetc(tiger);
    pix[counter1][counter2]->g = fgetc(tiger);
    pix[counter1][counter2]->b = fgetc(tiger);
    fprintf(stdout, "%c %c %c", pix[counter1][counter2]->r, pix[counter1][counter2]->g, pix[counter1][counter2]->b);
    }
    }

    mainDriver.c:57:17: error: subscripted value is neither array nor pointer nor vector
    mainDriver.c:58:17: error: subscripted value is neither array nor pointer nor vector
    mainDriver.c:59:17: error: subscripted value is neither array nor pointer nor vector
    int **counter1 = 0, counter2;

    something to do with the 2d array not being strongly typed properly
    I am the owner of http://www.ezmangaforum.com
    Reply With Quote
     

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •