fpermissive error

Discussion in 'C++' started by codeBlue, Mar 6, 2023.

  1. codeBlue

    codeBlue New Member

    Joined:
    Feb 16, 2023
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Gender:
    Male
    I am coding a project and when I compile it I get the following error.
    src/bitmatrix.cpp: In function ‘Bitmatrix* Inverse(const Bitmatrix*)’:
    src/bitmatrix.cpp:353:23: error: passing ‘const Bitmatrix’ as ‘this’ argument discards qualifiers [-fpermissive]
    m->Swap_Rows(r, c);

    I have tried a few things to fix this but have been unsuccessful, if you all need the portion of code this pertains to I can post that up as well.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You have to share your code for us to be able to find the error. It looks like your function is not define right.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice