0

In this example, what will it happen if I assign for example:

pk = 6;

Thanks!

cs50 pset4

1 Answer 1

1

You will get the following message in CS50 IDE: error: incompatible integer to pointer conversion assigning to 'int *' from 'int'.

In the code above, pk is a pointer to an integer, not an integer itself. Therefore, assigning an integer to it will give you a compile-time error.

2
  • Great! Thanks for the clarification, Peter! Commented May 19, 2017 at 12:35
  • You are welcome! If that answered your question, please accept the answer to close out this topic. Thanks!
    – Peter
    Commented May 19, 2017 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .