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 7684621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:04:13+00:00 2026-05-31T19:04:13+00:00

main.c:78:25: erreur: assignment from incompatible pointer type [-Werror] main.c:81:9: erreur: passing argument 2 of

  • 0
main.c:78:25: erreur: assignment from incompatible pointer type [-Werror]
main.c:81:9: erreur: passing argument 2 of ‘matrix_multiply’ from incompatible pointer type [-Werror]
main.c:6:11: note: expected ‘struct matrix_t *’ but argument is of type ‘struct matrix_t *’

line 6 is the matrix_multiply function

here is my code which begin at line 74

matrix_t *m;
matrix_t *first = matrix_reader_next(reader);
matrix_t *previous = first;
while ( (m = matrix_reader_next(reader))) {
    previous->next = m;
    previous = m;
}
matrix_t *result = matrix_multiply(first,first->next);

and here are my function prototypes and structure

typedef struct {
   int **M;
   int nLi;
   int nCo;
   struct matrix_t *next;
} matrix_t;

matrix_t* matrix_multiply(matrix_t* first, matrix_t*second);
matrix_t* matrix_reader_next(matrix_reader_t *r);

I really don’t understand these error message. Please help me 🙂

  • 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-31T19:04:14+00:00Added an answer on May 31, 2026 at 7:04 pm

    Your type definition should read

    typedef struct matrix_t {
       int **M;
       int nLi;
       int nCo;
       struct matrix_t *next;
    } matrix_t;
    

    Otherwise, the type matrix_t refers to a complete but unnamed structure type, whereas struct matrix_t refers to a different, named but incomplete structure type which you never define.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

main.php: <SCRIPT type=text/javascript> $(#btnSubmit).click(function () { alert(What will i put here!); }); </SCRIPT> <input
main() calls Call_By_Test() function with argument parameter First Node. I have freed the First
Main thread reads data from sockets and stores it in queue. Second thread write
main.xul <?xml version=1.0?> <?xml-stylesheet href=main.css type=text/css?> <window id=main class=MainClass title=MY TEST width=640 height=480 xmlns=http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul>
Main problem: how do i group elements by their Date, only if continuous and
main() { printf(Hello World.); } Why does no warning is produced in gcc compiler
main() { char a,b,c; a=6; b=-5; c = a+b ; printf (%d %d %d
main.c (with all the headers like stdio, stdlib, etc): int main() { int input;
The main web application of my company is crying out for a nifty set
My main JavaScript framework is jQuery , so I would like my unit test

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.