strange warning


  • 0

    Hello,

    When I try to submit in C language i got:
    warning: passing argument 3 of 'deserialize_cstring_2d_list' from incompatible pointer type [-Wincompatible-pointer-types]
    Could you fix it please?


  • 0
    R

    Hi,

    Do you know in the C function, what does accountsColSize means?

    Thanks


  • 0

    Yes, I know. From the example:
    [["John", 'john00@mail.com', 'john_newyork@mail.com', 'johnsmith@mail.com'],
    ["John", "johnnybravo@mail.com"],
    ["Mary", "mary@mail.com"]]
    it should be 4, 2, 2
    This is the size of each array in the resilt.
    I fould that if I create the function deserialize_cstring_2d_list - it gets called


  • 0
    R

    Hi,

    I think accountsColSize should be the size of each accounts[i] (as you said).
    But in the prototype

    char*** accountsMerge(char*** accounts, int accountsRowSize, int accountsColSize, int** columnSizes, int* returnSize) {
        
    }
    

    It is a single integer int accountsColSize!!! Do you know why?
    I think it should be an array (as you said 4, 2, 2).

    Do you think this might cause the warning?

    Thanks


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.