Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7491957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:12:10+00:00 2026-05-29T16:12:10+00:00

typedef struct{ IMAGE *fuente; IMAGE *destino; int saltos; } ARGTHREAD; ARGTHREAD values; DWORD WINAPI

  • 0
typedef struct{
    IMAGE *fuente;
    IMAGE *destino;
    int saltos;
} ARGTHREAD;

ARGTHREAD values;

DWORD WINAPI ProcessThread(LPVOID arg){

    int i,j,imageRows,imageCols,C,R;
    PIXEL *pfte,*pdst;
    PIXEL *v0,*v1,*v2,*v3,*v4,*v5,*v6,*v7;

    //memcpy(arg->destino, arg->fuente,sizeof(IMAGE)-sizeof(PIXEL *));

    imageRows = arg->fuente->infoheader.rows;//error here ->
    imageCols = arg->fuente->infoheader.cols;//error here ->

    //arg->destino->pixel=(PIXEL *)malloc(sizeof(PIXEL)*imageRows*imageCols);

    i=arg->saltos;//error here ->
    R=imageRows-1;
    C=imageCols-1;
    while(i<R){
                j=1;        
            while(j<C){
                pfte=arg->fuente->pixel+imageCols*i+j;//error here ->
                v0=pfte-imageCols-1;
                v1=pfte-imageCols;
                v2=pfte-imageCols+1;
                v3=pfte-1;
                v4=pfte+1;
                v5=pfte+imageCols-1;
                v6=pfte+imageCols;
                v7=pfte+imageCols+1;

                pdst=arg->destino->pixel+imageCols*i+j;//error here ->

            if(abs(blackandwhite(*pfte)-blackandwhite(*v0))>DIF ||
                    abs(blackandwhite(*pfte)-blackandwhite(*v1))>DIF ||
                    abs(blackandwhite(*pfte)-blackandwhite(*v2))>DIF ||
                    abs(blackandwhite(*pfte)-blackandwhite(*v3))>DIF ||
                    abs(blackandwhite(*pfte)-blackandwhite(*v4))>DIF ||
                    abs(blackandwhite(*pfte)-blackandwhite(*v5))>DIF ||
                    abs(blackandwhite(*pfte)-blackandwhite(*v6))>DIF ||
                    abs(blackandwhite(*pfte)-blackandwhite(*v7))>DIF){

                    pdst->red=0;
                    pdst->green=0;
                    pdst->blue=0;
                }

                else{
                    pdst->red=255;
                    pdst->green=255;
                    pdst->blue=255;
                }
                j++;        
            }
        i = i+numProc;
    }
}

This is how i have created my tread:

myThread = CreateThread(NULL, 0,
(LPTHREAD_START_ROUTINE)ProcessThread, &values, 0, NULL );

Im getting a lot of these errors and i cant figure it out why?

Error 8 error C2228: left of ‘.cols’ must have class/struct/union

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T16:12:10+00:00Added an answer on May 29, 2026 at 4:12 pm

    arg is a void* pointer, you can’t get anything out of it without first casting it back to the appropriate type:

    ARGTHREAD* arg_values = static_cast<ARGTHREAD*>(arg);
    // use arg_values->...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created the following C library for reading an image: typedef struct {
Consider the following: typedef struct { int a; int b; int c; int d;
I have these structs: typedef struct _Frag{ struct _Frag *next; char *seq; int x1;
I've got something like: typedef struct Data_s { int field1; int field2; } Data;
int a[10]; int b[10]; a = b; // illegal typedef struct { int real;
typedef struct child_list {int count; char vo[100]; child_list*next;} child_list; typedef struct parent_list { char
You can see what I'm trying to do below: typedef struct image_bounds { int
typedef struct Complex{ double real; int img; } Complex; I've seen people use it
typedef struct Model { int recordId; char *name; }Model; typedef struct ModelArray { //keeps
typedef struct Matrix { double * matrix; int sizex; int sizey; }Matrix; int nn

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.