samedi 25 avril 2020

error with int* to int conversion , with no integer and just two pointers

I get a int to int* conversion error for the following code:

int main()
{
    int *a,b;
    a=b;
}

and I do not get any error for the following code:

int main()
{
    int *a;
    int *b;
    a=b;
}

I don't the difference these two cases have.
Can I not declare pointers together?

Aucun commentaire:

Enregistrer un commentaire